Class Node.JspAttribute

  • Enclosing class:
    Node

    public static class Node.JspAttribute
    extends java.lang.Object
    Represents attributes that can be request time expressions. Can either be a plain attribute, an attribute that represents a request time expression value, or a named attribute (specified using the jsp:attribute standard action).
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ELNode.Nodes getEL()
      Returns the EL expression nodes for this attribute.
      java.lang.String getExpectedTypeName()
      Returns the expected type name for this attribute.
      java.lang.String getLocalName()
      Returns the local name of the attribute.
      java.lang.String getName()
      Returns the name of the attribute.
      Node.NamedAttribute getNamedAttributeNode()
      Returns the named attribute node.
      java.lang.String[] getParameterTypeNames()
      Returns the parameter type names for a deferred method expression.
      TagAttributeInfo getTagAttributeInfo()
      Returns the TagAttributeInfo for this attribute.
      java.lang.String getURI()
      Returns the namespace of the attribute.
      java.lang.String getValue()
      Returns the value for the attribute.
      boolean isDeferredInput()
      Returns whether this is a deferred value expression input.
      boolean isDeferredMethodInput()
      Returns whether this is a deferred method expression input.
      boolean isDynamic()
      Returns whether the attribute is a "dynamic" attribute of a custom tag that implements DynamicAttributes interface.
      boolean isELInterpreterInput()
      Returns whether the value represents an expression that should be fed to the expression interpreter.
      boolean isExpression()
      Returns whether the value represents a traditional rtexprvalue.
      boolean isLiteral()
      Returns whether the value is a string literal known at translation time.
      boolean isNamedAttribute()
      Returns whether the value represents a NamedAttribute value.
      void validateEL​(ExpressionFactory ef, ELContext ctx)
      Allow node to validate itself.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • validateEL

        public void validateEL​(ExpressionFactory ef,
                               ELContext ctx)
                        throws ELException
        Allow node to validate itself.
        Parameters:
        ef - The expression factory to use to evaluate any EL
        ctx - The context to use to evaluate any EL
        Throws:
        ELException - If validation fails
      • getName

        public java.lang.String getName()
        Returns the name of the attribute.
        Returns:
        The name of the attribute
      • getLocalName

        public java.lang.String getLocalName()
        Returns the local name of the attribute.
        Returns:
        The local name of the attribute
      • getURI

        public java.lang.String getURI()
        Returns the namespace of the attribute.
        Returns:
        The namespace of the attribute, or null if in the default namespace
      • getTagAttributeInfo

        public TagAttributeInfo getTagAttributeInfo()
        Returns the TagAttributeInfo for this attribute.
        Returns:
        The TagAttributeInfo, or null if not available
      • isDeferredInput

        public boolean isDeferredInput()
        Returns whether this is a deferred value expression input.
        Returns:
        true if there's TagAttributeInfo meaning we need to assign a ValueExpression
      • isDeferredMethodInput

        public boolean isDeferredMethodInput()
        Returns whether this is a deferred method expression input.
        Returns:
        true if there's TagAttributeInfo meaning we need to assign a MethodExpression
      • getExpectedTypeName

        public java.lang.String getExpectedTypeName()
        Returns the expected type name for this attribute.
        Returns:
        The expected type name, or "java.lang.Object" as default
      • getParameterTypeNames

        public java.lang.String[] getParameterTypeNames()
        Returns the parameter type names for a deferred method expression.
        Returns:
        Array of parameter type names, or empty array if not applicable
      • getValue

        public java.lang.String getValue()
        Returns the value for the attribute. Only makes sense if namedAttribute is false.
        Returns:
        The value for the attribute, or the expression string (stripped of "<%=", "%>", "%=", or "%" but containing "${" and "}" for EL expressions)
      • getNamedAttributeNode

        public Node.NamedAttribute getNamedAttributeNode()
        Returns the named attribute node. Only makes sense if namedAttribute is true.
        Returns:
        The nodes that evaluate to the body of this attribute
      • isExpression

        public boolean isExpression()
        Returns whether the value represents a traditional rtexprvalue.
        Returns:
        true if the value represents a traditional rtexprvalue
      • isNamedAttribute

        public boolean isNamedAttribute()
        Returns whether the value represents a NamedAttribute value.
        Returns:
        true if the value represents a NamedAttribute value
      • isELInterpreterInput

        public boolean isELInterpreterInput()
        Returns whether the value represents an expression that should be fed to the expression interpreter.
        Returns:
        true if the value should be fed to the expression interpreter; false for string literals or rtexprvalues that should not be interpreted or reevaluated
      • isLiteral

        public boolean isLiteral()
        Returns whether the value is a string literal known at translation time.
        Returns:
        true if the value is a string literal known at translation time
      • isDynamic

        public boolean isDynamic()
        Returns whether the attribute is a "dynamic" attribute of a custom tag that implements DynamicAttributes interface.
        Returns:
        true if the attribute is a "dynamic" attribute of a custom tag that implements DynamicAttributes interface. That is, a random extra attribute that is not declared by the tag
      • getEL

        public ELNode.Nodes getEL()
        Returns the EL expression nodes for this attribute.
        Returns:
        The EL nodes, or null if not an EL expression