Class MethodExpressionLiteral
java.lang.Object
jakarta.el.Expression
jakarta.el.MethodExpression
org.apache.el.MethodExpressionLiteral
- All Implemented Interfaces:
Externalizable, Serializable
Literal method expression.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.MethodExpressionLiteral(String expr, Class<?> expectedType, Class<?>[] paramTypes) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the original string representation of this EL expression as it was parsed.getMethodInfo(ELContext context) Returns information about the method that this expression resolves to.getMethodReference(ELContext context) Obtain theMethodReferencefor the method to which this method expression resolves.inthashCode()Invokes the method that this expression resolves to with the given parameters.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.voidvoidMethods inherited from class MethodExpression
isParametersProvided
-
Constructor Details
-
MethodExpressionLiteral
public MethodExpressionLiteral()Default constructor. -
MethodExpressionLiteral
-
-
Method Details
-
getMethodInfo
Description copied from class:jakarta.el.MethodExpressionReturns information about the method that this expression resolves to.- Specified by:
getMethodInfoin classMethodExpression- Parameters:
context- The EL context for this evaluation- Returns:
- Information about the method that this expression resolves to
- Throws:
ELException- Wraps any exception throw whilst resolving the property
-
invoke
Description copied from class:jakarta.el.MethodExpressionInvokes the method that this expression resolves to with the given parameters.- Specified by:
invokein classMethodExpression- Parameters:
context- The EL context for this evaluationparams- The parameters with which to invoke this method expression- Returns:
- The result of invoking this method expression
- Throws:
ELException- Wraps any exception throw whilst resolving the property or coercion of the result to the expected return type fails
-
getMethodReference
Description copied from class:jakarta.el.MethodExpressionObtain theMethodReferencefor the method to which this method expression resolves.- Overrides:
getMethodReferencein classMethodExpression- Parameters:
context- The EL context for this evaluation- Returns:
- This default implementation always returns
null
-
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
-
equals
- Specified by:
equalsin classExpression
-
hashCode
public int hashCode()- Specified by:
hashCodein classExpression
-
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
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-