ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/java/org/apache/jasper/el/JspValueExpression.java

Path
ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/java/org/apache/jasper/el/JspValueExpression.java
Status
scanned
Type
file
Name
JspValueExpression.java
Extension
.java
Programming language
Java
Mime type
text/plain
File type
ASCII text, with CRLF line terminators
Tag

      
    
Rootfs path

      
    
Size
5881 (5.7 KB)
MD5
8e4b6880b21f6e7f9bafc3e69002f5bd
SHA1
c850685d5e157fe40d1f7b5b70545e3104f65a4b
SHA256
111461a30c057365bbc5cfdfb744a652945088ee14dc81390dc69e2e639f6336
SHA512

      
    
SHA1_git
cddbeb299414f5d6b67fe60ad38cd753bc4169b1
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
JspValueExpression.java | 5.7 KB |

/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jasper.el; import java.io.Externalizable; import java.io.IOException; import java.io.ObjectInput; import java.io.ObjectOutput; import jakarta.el.ELContext; import jakarta.el.ELException; import jakarta.el.PropertyNotFoundException; import jakarta.el.PropertyNotWritableException; import jakarta.el.ValueExpression; /** * Wrapper for providing context to ValueExpressions. */ public final class JspValueExpression extends ValueExpression implements Externalizable { private ValueExpression target; private String mark; public JspValueExpression() { super(); } public JspValueExpression(String mark, ValueExpression target) { this.target = target; this.mark = mark; } @Override public Class<?> getExpectedType() { return this.target.getExpectedType(); } @Override public Class<?> getType(ELContext context) throws NullPointerException, PropertyNotFoundException, ELException { context.notifyBeforeEvaluation(getExpressionString()); try { Class<?> result = this.target.getType(context); context.notifyAfterEvaluation(getExpressionString()); return result; } catch (PropertyNotFoundException e) { if (e instanceof JspPropertyNotFoundException) { throw e; } throw new JspPropertyNotFoundException(this.mark, e); } catch (ELException e) { if (e instanceof JspELException) { throw e; } throw new JspELException(this.mark, e); } } @Override public boolean isReadOnly(ELContext context) throws NullPointerException, PropertyNotFoundException, ELException { context.notifyBeforeEvaluation(getExpressionString()); try { boolean result = this.target.isReadOnly(context); context.notifyAfterEvaluation(getExpressionString()); return result; } catch (PropertyNotFoundException e) { if (e instanceof JspPropertyNotFoundException) { throw e; } throw new JspPropertyNotFoundException(this.mark, e); } catch (ELException e) { if (e instanceof JspELException) { throw e; } throw new JspELException(this.mark, e); } } @Override public void setValue(ELContext context, Object value) throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException { context.notifyBeforeEvaluation(getExpressionString()); try { this.target.setValue(context, value); context.notifyAfterEvaluation(getExpressionString()); } catch (PropertyNotWritableException e) { if (e instanceof JspPropertyNotWritableException) { throw e; } throw new JspPropertyNotWritableException(this.mark, e); } catch (PropertyNotFoundException e) { if (e instanceof JspPropertyNotFoundException) { throw e; } throw new JspPropertyNotFoundException(this.mark, e); } catch (ELException e) { if (e instanceof JspELException) { throw e; } throw new JspELException(this.mark, e); } } @Override public <T> T getValue(ELContext context) throws NullPointerException, PropertyNotFoundException, ELException { context.notifyBeforeEvaluation(getExpressionString()); try { T result = this.target.getValue(context); context.notifyAfterEvaluation(getExpressionString()); return result; } catch (PropertyNotFoundException e) { if (e instanceof JspPropertyNotFoundException) { throw e; } throw new JspPropertyNotFoundException(this.mark, e); } catch (ELException e) { if (e instanceof JspELException) { throw e; } throw new JspELException(this.mark, e); } } @Override public boolean equals(Object obj) { return this.target.equals(obj); } @Override public int hashCode() { return this.target.hashCode(); } @Override public String getExpressionString() { return this.target.getExpressionString(); } @Override public boolean isLiteralText() { return this.target.isLiteralText(); } @Override public void writeExternal(ObjectOutput out) throws IOException { out.writeUTF(this.mark); out.writeObject(this.target); } @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { this.mark = in.readUTF(); this.target = (ValueExpression) in.readObject(); } }
Detected license expression
apache-2.0
Detected license expression (SPDX)
Apache-2.0
Percentage of license text
23.61
Copyrights

      
    
Holders

      
    
Authors

      
    
License detections License expression License expression SPDX
apache_2_0-4bde3f57-78aa-4201-96bf-531cba09e7de apache-2.0 Apache-2.0
URL Start line End line
http://www.apache.org/licenses/LICENSE-2.0 9 9