javax.servlet.jsp.tagext
Class TagAttributeInfo

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagAttributeInfo

public class TagAttributeInfo
extends Object

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.


Field Summary
static String ID
          "id" is wired in to be ID.
 
Constructor Summary
TagAttributeInfo(String name, boolean required, String type, boolean reqTime)
          Constructor for TagAttributeInfo.
TagAttributeInfo(String name, boolean required, String type, boolean reqTime, boolean fragment)
          JSP 2.0 Constructor for TagAttributeInfo.
TagAttributeInfo(String name, boolean required, String type, boolean reqTime, boolean fragment, String description, boolean deferredValue, boolean deferredMethod, String expectedTypeName, String methodSignature)
           
 
Method Summary
 boolean canBeRequestTime()
          Whether this attribute can hold a request-time value.
 String getDescription()
           
 String getExpectedTypeName()
           
static TagAttributeInfo getIdAttribute(TagAttributeInfo[] a)
          Convenience static method that goes through an array of TagAttributeInfo objects and looks for "id".
 String getMethodSignature()
           
 String getName()
          The name of this attribute.
 String getTypeName()
          The type (as a String) of this attribute.
 boolean isDeferredMethod()
           
 boolean isDeferredValue()
           
 boolean isFragment()
          Whether this attribute is of type JspFragment.
 boolean isRequired()
          Whether this attribute is required.
 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

ID

public static final String ID
"id" is wired in to be ID. There is no real benefit in having it be something else IDREFs are not handled any differently.

See Also:
Constant Field Values
Constructor Detail

TagAttributeInfo

public TagAttributeInfo(String name,
                        boolean required,
                        String type,
                        boolean reqTime)
Constructor for TagAttributeInfo. This class is to be instantiated only from the TagLibrary code under request from some JSP code that is parsing a TLD (Tag Library Descriptor).

Parameters:
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.

TagAttributeInfo

public TagAttributeInfo(String name,
                        boolean required,
                        String type,
                        boolean reqTime,
                        boolean fragment)
JSP 2.0 Constructor for TagAttributeInfo. This class is to be instantiated only from the TagLibrary code under request from some JSP code that is parsing a TLD (Tag Library Descriptor).

Parameters:
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 JspFragment
Since:
2.0

TagAttributeInfo

public TagAttributeInfo(String name,
                        boolean required,
                        String type,
                        boolean reqTime,
                        boolean fragment,
                        String description,
                        boolean deferredValue,
                        boolean deferredMethod,
                        String expectedTypeName,
                        String methodSignature)
Since:
JSP 2.1
Method Detail

getName

public String getName()
The name of this attribute.

Returns:
the name of the attribute

getTypeName

public String getTypeName()
The type (as a String) of this attribute.

Returns:
the type of the attribute

canBeRequestTime

public boolean canBeRequestTime()
Whether this attribute can hold a request-time value.

Returns:
if the attribute can hold a request-time value.

isRequired

public boolean isRequired()
Whether this attribute is required.

Returns:
if the attribute is required.

getIdAttribute

public static TagAttributeInfo getIdAttribute(TagAttributeInfo[] a)
Convenience static method that goes through an array of TagAttributeInfo objects and looks for "id".

Parameters:
a - An array of TagAttributeInfo
Returns:
The TagAttributeInfo reference with name "id"

isFragment

public boolean isFragment()
Whether this attribute is of type JspFragment.

Returns:
if the attribute is of type JspFragment
Since:
2.0

toString

public String toString()
Returns a String representation of this TagAttributeInfo, suitable for debugging purposes.

Overrides:
toString in class Object
Returns:
a String representation of this TagAttributeInfo

isDeferredMethod

public boolean isDeferredMethod()

isDeferredValue

public boolean isDeferredValue()

getDescription

public String getDescription()

getExpectedTypeName

public String getExpectedTypeName()

getMethodSignature

public String getMethodSignature()

(Built by coreservlets)

As of July 2010, there were no online versions of the servlet 3.0, JSP 2.2, and EL 2.2 Javadocs, except as part of the huge Java EE 6 API. So, I built them myself from the Tomcat 7 source code.

Java EE TutorialsJava EE Training