Class Node.JspAttribute
java.lang.Object
org.apache.jasper.compiler.Node.JspAttribute
- Enclosing class:
Node
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
Modifier and TypeMethodDescriptiongetEL()Returns the EL expression nodes for this attribute.Returns the expected type name for this attribute.Returns the local name of the attribute.getName()Returns the name of the attribute.Returns the named attribute node.String[]Returns the parameter type names for a deferred method expression.Returns the TagAttributeInfo for this attribute.getURI()Returns the namespace of the attribute.getValue()Returns the value for the attribute.booleanReturns whether this is a deferred value expression input.booleanReturns whether this is a deferred method expression input.booleanReturns whether the attribute is a "dynamic" attribute of a custom tag that implements DynamicAttributes interface.booleanReturns whether the value represents an expression that should be fed to the expression interpreter.booleanReturns whether the value represents a traditional rtexprvalue.booleanReturns whether the value is a string literal known at translation time.booleanReturns whether the value represents a NamedAttribute value.voidvalidateEL(ExpressionFactory ef, ELContext ctx) Allow node to validate itself.
-
Method Details
-
validateEL
Allow node to validate itself.- Parameters:
ef- The expression factory to use to evaluate any ELctx- The context to use to evaluate any EL- Throws:
ELException- If validation fails
-
getName
-
getLocalName
Returns the local name of the attribute.- Returns:
- The local name of the attribute
-
getURI
Returns the namespace of the attribute.- Returns:
- The namespace of the attribute, or
nullif in the default namespace
-
getTagAttributeInfo
Returns the TagAttributeInfo for this attribute.- Returns:
- The TagAttributeInfo, or
nullif not available
-
isDeferredInput
public boolean isDeferredInput()Returns whether this is a deferred value expression input.- Returns:
trueif there's TagAttributeInfo meaning we need to assign a ValueExpression
-
isDeferredMethodInput
public boolean isDeferredMethodInput()Returns whether this is a deferred method expression input.- Returns:
trueif there's TagAttributeInfo meaning we need to assign a MethodExpression
-
getExpectedTypeName
Returns the expected type name for this attribute.- Returns:
- The expected type name, or "java.lang.Object" as default
-
getParameterTypeNames
Returns the parameter type names for a deferred method expression.- Returns:
- Array of parameter type names, or empty array if not applicable
-
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
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:
trueif the value represents a traditional rtexprvalue
-
isNamedAttribute
public boolean isNamedAttribute()Returns whether the value represents a NamedAttribute value.- Returns:
trueif 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:
trueif the value should be fed to the expression interpreter;falsefor 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:
trueif 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:
trueif 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
Returns the EL expression nodes for this attribute.- Returns:
- The EL nodes, or
nullif not an EL expression
-