Package org.apache.el
Class MethodExpressionLiteral
- java.lang.Object
-
- jakarta.el.Expression
-
- jakarta.el.MethodExpression
-
- org.apache.el.MethodExpressionLiteral
-
- All Implemented Interfaces:
Externalizable,Serializable
public class MethodExpressionLiteral extends MethodExpression implements Externalizable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MethodExpressionLiteral()MethodExpressionLiteral(String expr, Class<?> expectedType, Class<?>[] paramTypes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)StringgetExpressionString()MethodInfogetMethodInfo(ELContext context)MethodReferencegetMethodReference(ELContext context)Obtain theMethodReferencefor the method to which this method expression resolves.inthashCode()Objectinvoke(ELContext context, Object[] params)booleanisLiteralText()voidreadExternal(ObjectInput in)voidwriteExternal(ObjectOutput out)-
Methods inherited from class jakarta.el.MethodExpression
isParametersProvided
-
-
-
-
Method Detail
-
getMethodInfo
public MethodInfo getMethodInfo(ELContext context) throws ELException
- Specified by:
getMethodInfoin classMethodExpression- Parameters:
context- The EL context for this evaluation- Returns:
- Information about the method that this expression resolves to
- Throws:
PropertyNotFoundException- If a property/variable resolution failed because no match was found or a match was found but was not readableMethodNotFoundException- If no matching method can be foundELException- Wraps any exception throw whilst resolving the property
-
invoke
public Object invoke(ELContext context, Object[] params) throws ELException
- 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:
PropertyNotFoundException- If a property/variable resolution failed because no match was found or a match was found but was not readableMethodNotFoundException- If no matching method can be foundELException- Wraps any exception throw whilst resolving the property or coercion of the result to the expected return type fails
-
getMethodReference
public MethodReference getMethodReference(ELContext context)
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
public String getExpressionString()
- Specified by:
getExpressionStringin classExpression
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin classExpression
-
hashCode
public int hashCode()
- Specified by:
hashCodein classExpression
-
isLiteralText
public boolean isLiteralText()
- Specified by:
isLiteralTextin classExpression
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
-