Class JspMethodExpression

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

    public final class JspMethodExpression
    extends MethodExpression
    implements java.io.Externalizable
    Wrapper around a MethodExpression that adds JSP-specific error tracking with marks. Implements Externalizable for serialization support.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      JspMethodExpression()
      Default constructor required by Externalizable.
      JspMethodExpression​(java.lang.String mark, MethodExpression target)
      Creates a new JspMethodExpression wrapping the given target expression.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      java.lang.String getExpressionString()
      Returns the original string representation of this EL expression as it was parsed.
      MethodInfo getMethodInfo​(ELContext context)
      Returns information about the method that this expression resolves to.
      MethodReference getMethodReference​(ELContext context)
      Obtain the MethodReference for the method to which this method expression resolves.
      int hashCode()  
      java.lang.Object invoke​(ELContext context, java.lang.Object[] params)
      Invokes the method that this expression resolves to with the given parameters.
      boolean isLiteralText()
      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.
      boolean isParametersProvided()
      Returns whether the parameters for the method invocation are provided by the expression or by the container.
      void readExternal​(java.io.ObjectInput in)  
      void writeExternal​(java.io.ObjectOutput out)  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JspMethodExpression

        public JspMethodExpression()
        Default constructor required by Externalizable.
      • JspMethodExpression

        public JspMethodExpression​(java.lang.String mark,
                                   MethodExpression target)
        Creates a new JspMethodExpression wrapping the given target expression.
        Parameters:
        mark - the mark for error tracking
        target - the underlying MethodExpression to wrap
    • Method Detail

      • invoke

        public java.lang.Object invoke​(ELContext context,
                                       java.lang.Object[] params)
                                throws java.lang.NullPointerException,
                                       PropertyNotFoundException,
                                       MethodNotFoundException,
                                       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:
        java.lang.NullPointerException - If the supplied context is null
        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
      • isParametersProvided

        public boolean isParametersProvided()
        Description copied from class: jakarta.el.MethodExpression
        Returns whether the parameters for the method invocation are provided by the expression or by the container.
        Overrides:
        isParametersProvided in class MethodExpression
        Returns:
        This default implementation always returns false
      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in class Expression
      • 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
      • 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
      • writeExternal

        public void writeExternal​(java.io.ObjectOutput out)
                           throws java.io.IOException
        Specified by:
        writeExternal in interface java.io.Externalizable
        Throws:
        java.io.IOException
      • 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