Package org.apache.el

Class MethodExpressionLiteral

  • All Implemented Interfaces:
    java.io.Externalizable, java.io.Serializable

    public class MethodExpressionLiteral
    extends MethodExpression
    implements java.io.Externalizable
    Literal method expression.
    See Also:
    Serialized Form
    • Constructor Detail

      • MethodExpressionLiteral

        public MethodExpressionLiteral()
        Default constructor.
      • MethodExpressionLiteral

        public MethodExpressionLiteral​(java.lang.String expr,
                                       java.lang.Class<?> expectedType,
                                       java.lang.Class<?>[] paramTypes)
        Constructor.
        Parameters:
        expr - the expression
        expectedType - the expected type
        paramTypes - the parameter types
    • Method Detail

      • invoke

        public java.lang.Object invoke​(ELContext context,
                                       java.lang.Object[] params)
                                throws ELException
        Description copied from class: jakarta.el.MethodExpression
        Invokes the method that this expression resolves to with the given parameters.
        Specified by:
        invoke in class MethodExpression
        Parameters:
        context - The EL context for this evaluation
        params - 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 readable
        MethodNotFoundException - If no matching method can be found
        ELException - Wraps any exception throw whilst resolving the property or coercion of the result to the expected return type fails
      • getExpressionString

        public java.lang.String getExpressionString()
        Description copied from class: jakarta.el.Expression
        Returns the original string representation of this EL expression as it was parsed.
        Specified by:
        getExpressionString in class Expression
        Returns:
        the string representation of this expression
      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in class Expression
      • isLiteralText

        public boolean isLiteralText()
        Description copied from class: jakarta.el.Expression
        Returns 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:
        isLiteralText in class Expression
        Returns:
        true if this expression is a literal text, false otherwise
      • readExternal

        public void readExternal​(java.io.ObjectInput in)
                          throws java.io.IOException,
                                 java.lang.ClassNotFoundException
        Specified by:
        readExternal in interface java.io.Externalizable
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • writeExternal

        public void writeExternal​(java.io.ObjectOutput out)
                           throws java.io.IOException
        Specified by:
        writeExternal in interface java.io.Externalizable
        Throws:
        java.io.IOException