|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.jsp.tagext.TagAttributeInfo
public class TagAttributeInfo
Information on the attributes of a Tag, available at translation time. This class is instantiated from the Tag Library Descriptor file (TLD).
Only the information needed to generate code is included here. Other information like SCHEMA for validation belongs elsewhere.
Note from the Expert Group:
This should have been designed as an interface. Every time we change the TLD,
we need to add a new constructor to this class (not good).
This class should only be instantiated by container implementations
(not by JSP developers).
Field Summary | |
---|---|
static java.lang.String |
ID
"id" is wired in to be ID. |
Constructor Summary | |
---|---|
TagAttributeInfo(java.lang.String name,
boolean required,
java.lang.String type,
boolean reqTime)
Constructor for TagAttributeInfo. |
|
TagAttributeInfo(java.lang.String name,
boolean required,
java.lang.String type,
boolean reqTime,
boolean fragment)
JSP 2.0 Constructor for TagAttributeInfo. |
|
TagAttributeInfo(java.lang.String name,
boolean required,
java.lang.String type,
boolean reqTime,
boolean fragment,
java.lang.String description,
boolean deferredValue,
boolean deferredMethod,
java.lang.String expectedTypeName,
java.lang.String methodSignature)
JSP 2.1 Constructor for TagAttributeInfo. |
Method Summary | |
---|---|
boolean |
canBeRequestTime()
Whether this attribute has been specified in the TLD as rtexprvalue. |
java.lang.String |
getDescription()
Gets the description string of this tag attribute. |
java.lang.String |
getExpectedTypeName()
Returns the name of the expected type (as a String) of this deferred value attribute. |
static TagAttributeInfo |
getIdAttribute(TagAttributeInfo[] a)
Convenience static method that goes through an array of TagAttributeInfo objects and looks for "id". |
java.lang.String |
getMethodSignature()
Returns the expected method signature of this deferred method attribute. |
java.lang.String |
getName()
The name of this attribute. |
java.lang.String |
getTypeName()
The type (as a String) of this attribute. |
boolean |
isDeferredMethod()
Returns true if this attribute is to be passed a
MethodExpression so that expression evaluation
can be deferred. |
boolean |
isDeferredValue()
Returns true if this attribute is to be passed a
ValueExpression so that expression evaluation
can be deferred. |
boolean |
isFragment()
Whether this attribute is of type JspFragment. |
boolean |
isRequired()
Whether this attribute is required. |
java.lang.String |
toString()
Returns a String representation of this TagAttributeInfo, suitable for debugging purposes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ID
Constructor Detail |
---|
public TagAttributeInfo(java.lang.String name, boolean required, java.lang.String type, boolean reqTime)
name
- The name of the attribute.required
- If this attribute is required in tag instances.type
- The name of the type of the attribute.reqTime
- Whether this attribute holds a request-time Attribute.public TagAttributeInfo(java.lang.String name, boolean required, java.lang.String type, boolean reqTime, boolean fragment)
name
- The name of the attribute.required
- If this attribute is required in tag instances.type
- The name of the type of the attribute.reqTime
- Whether this attribute holds a request-time Attribute.fragment
- Whether this attribute is of type JspFragmentpublic TagAttributeInfo(java.lang.String name, boolean required, java.lang.String type, boolean reqTime, boolean fragment, java.lang.String description, boolean deferredValue, boolean deferredMethod, java.lang.String expectedTypeName, java.lang.String methodSignature)
name
- The name of the attribute.required
- If this attribute is required in tag instances.type
- The name of the type of the attribute.reqTime
- Whether this attribute holds a request-time Attribute.fragment
- Whether this attribute is of type JspFragmentdescription
- The description of the attribute.deferredValue
- Whether this attribute is a deferred value.deferredMethod
- Whether this attribute is a deferred method.
rtexpr or deferred value.expectedTypeName
- The name of the expected type of this deferred
value (or null
if this is not a deferred value).methodSignature
- The expected method signature of this deferred
method (or null
if this is not a deferred method).Method Detail |
---|
public java.lang.String getName()
public java.lang.String getTypeName()
This method must return "javax.el.ValueExpression"
if isDeferredValue()
returns true
and
canBeRequestTime()
returns false
. It
must return "javax.el.MethodExpression"
if
isDeferredMethod()
returns true
.
It must return "java.lang.Object"
if
isDeferredValue()
returns true
and
canBeRequestTime()
returns true
.
public boolean canBeRequestTime()
true
, this means the attribute
can hold a request-time value.
public boolean isRequired()
public static TagAttributeInfo getIdAttribute(TagAttributeInfo[] a)
a
- An array of TagAttributeInfo
public boolean isFragment()
public java.lang.String getDescription()
public boolean isDeferredValue()
true
if this attribute is to be passed a
ValueExpression
so that expression evaluation
can be deferred.
If this method returns true
, then
getTypeName()
must return
"javax.el.ValueExpression"
.
The getExpectedType()
method can be used to retrieve
the expected type this value expression will be constructed with.
true
if this attribute accepts a deferred value;
false
otherwise.public boolean isDeferredMethod()
true
if this attribute is to be passed a
MethodExpression
so that expression evaluation
can be deferred.
If this method returns true
, then
getTypeName()
must return
"javax.el.MethodExpression"
.
The getMethodSignature()
method can be used to retrieve
the expected method signature this method expression will be
constructed with.
true
if this attribute accepts a deferred method;
false
otherwise.public java.lang.String getExpectedTypeName()
This method returns null
if
isDeferredValue()
returns false
.
public java.lang.String getMethodSignature()
This method returns null
if
isDeferredMethod()
returns false
.
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2009-2011, Oracle Corporation and/or its affiliates. All Rights Reserved. Use is subject to license terms.
Generated on 10-February-2011 12:41