Class JspValueExpression
java.lang.Object
jakarta.el.Expression
jakarta.el.ValueExpression
org.apache.jasper.el.JspValueExpression
- All Implemented Interfaces:
Externalizable, Serializable
Wrapper for providing context to ValueExpressions.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for deserialization.JspValueExpression(String mark, ValueExpression target) Constructs an instance with the given mark and target expression. -
Method Summary
Modifier and TypeMethodDescriptionbooleanClass<?> Returns the expected type of the result of this expression.Returns the original string representation of this EL expression as it was parsed.Class<?> Returns the type of the result produced by evaluating this expression.<T> TEvaluates this expression and returns the result.inthashCode()booleanReturns whether this expression is a literal text expression, meaning it does not contain any variables, functions, or operators and evaluates to a constant value.booleanisReadOnly(ELContext context) Determines whether the property referenced by this expression is read-only.voidvoidSets the value of the property referenced by this expression.voidMethods inherited from class ValueExpression
getValueReference
-
Constructor Details
-
JspValueExpression
public JspValueExpression()Default constructor for deserialization. -
JspValueExpression
Constructs an instance with the given mark and target expression.- Parameters:
mark- The mark stringtarget- The target value expression
-
-
Method Details
-
getExpectedType
Description copied from class:jakarta.el.ValueExpressionReturns the expected type of the result of this expression.- Specified by:
getExpectedTypein classValueExpression- Returns:
- The expected result type, or
Object.classif no specific type is expected
-
getType
public Class<?> getType(ELContext context) throws NullPointerException, PropertyNotFoundException, ELException Description copied from class:jakarta.el.ValueExpressionReturns the type of the result produced by evaluating this expression.- Specified by:
getTypein classValueExpression- Parameters:
context- The EL context for this evaluation- Returns:
- The type of the result of this value expression
- Throws:
NullPointerException- If the supplied context isnullPropertyNotFoundException- If a property/variable resolution failed because no match was found or a match was found but was not readableELException- Wraps any exception throw whilst resolving a property or variable
-
isReadOnly
public boolean isReadOnly(ELContext context) throws NullPointerException, PropertyNotFoundException, ELException Description copied from class:jakarta.el.ValueExpressionDetermines whether the property referenced by this expression is read-only.- Specified by:
isReadOnlyin classValueExpression- Parameters:
context- The EL context for this evaluation- Returns:
trueif this expression is read only otherwisefalse- Throws:
NullPointerException- If the supplied context isnullPropertyNotFoundException- If a property/variable resolution failed because no match was found or a match was found but was not readableELException- Wraps any exception throw whilst resolving a property or variable
-
setValue
public void setValue(ELContext context, Object value) throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException Description copied from class:jakarta.el.ValueExpressionSets the value of the property referenced by this expression.- Specified by:
setValuein classValueExpression- Parameters:
context- The EL context for this evaluationvalue- The value to set the property to which this value expression refers- Throws:
NullPointerException- If the supplied context isnullPropertyNotFoundException- If a property/variable resolution failed because no match was foundPropertyNotWritableException- If a property/variable resolution failed because a match was found but was not writableELException- Wraps any exception throw whilst resolving a property or variable
-
getValue
public <T> T getValue(ELContext context) throws NullPointerException, PropertyNotFoundException, ELException Description copied from class:jakarta.el.ValueExpressionEvaluates this expression and returns the result.- Specified by:
getValuein classValueExpression- Type Parameters:
T- The expected type for the result of evaluating this value expression- Parameters:
context- The EL context for this evaluation- Returns:
- The result of evaluating this value expression
- Throws:
NullPointerException- If the supplied context isnullPropertyNotFoundException- If a property/variable resolution failed because no match was found or a match was found but was not readableELException- Wraps any exception throw whilst resolving a property or variable
-
equals
- Specified by:
equalsin classExpression
-
hashCode
public int hashCode()- Specified by:
hashCodein classExpression
-
getExpressionString
Description copied from class:jakarta.el.ExpressionReturns the original string representation of this EL expression as it was parsed.- Specified by:
getExpressionStringin classExpression- Returns:
- the string representation of this expression
-
isLiteralText
public boolean isLiteralText()Description copied from class:jakarta.el.ExpressionReturns whether this expression is a literal text expression, meaning it does not contain any variables, functions, or operators and evaluates to a constant value.- Specified by:
isLiteralTextin classExpression- Returns:
trueif this expression is a literal text,falseotherwise
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-