TagInfopublic class TagInfo extends Object Tag information for a tag in a Tag Library;
This class is instantiated from the Tag Library Descriptor file (TLD)
and is available only at translation time. |
Fields Summary |
---|
public static final String | BODY_CONTENT_JSPStatic constant for getBodyContent() when it is JSP. | public static final String | BODY_CONTENT_TAG_DEPENDENTStatic constant for getBodyContent() when it is Tag dependent. | public static final String | BODY_CONTENT_EMPTYStatic constant for getBodyContent() when it is empty. | public static final String | BODY_CONTENT_SCRIPTLESSStatic constant for getBodyContent() when it is scriptless. | private String | tagName | private String | tagClassName | private String | bodyContent | private String | infoString | private TagLibraryInfo | tagLibrary | private TagExtraInfo | tagExtraInfo | private TagAttributeInfo[] | attributeInfo | private String | displayName | private String | smallIcon | private String | largeIcon | private TagVariableInfo[] | tagVariableInfo | private boolean | dynamicAttributes |
Constructors Summary |
---|
public TagInfo(String tagName, String tagClassName, String bodycontent, String infoString, TagLibraryInfo taglib, TagExtraInfo tagExtraInfo, TagAttributeInfo[] attributeInfo)Constructor for TagInfo from data in the JSP 1.1 format for TLD.
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).
Note that, since TagLibibraryInfo reflects both TLD information
and taglib directive information, a TagInfo instance is
dependent on a taglib directive. This is probably a
design error, which may be fixed in the future.
this.tagName = tagName;
this.tagClassName = tagClassName;
this.bodyContent = bodycontent;
this.infoString = infoString;
this.tagLibrary = taglib;
this.tagExtraInfo = tagExtraInfo;
this.attributeInfo = attributeInfo;
if (tagExtraInfo != null)
tagExtraInfo.setTagInfo(this);
| public TagInfo(String tagName, String tagClassName, String bodycontent, String infoString, TagLibraryInfo taglib, TagExtraInfo tagExtraInfo, TagAttributeInfo[] attributeInfo, String displayName, String smallIcon, String largeIcon, TagVariableInfo[] tvi)Constructor for TagInfo from data in the JSP 1.2 format for TLD.
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).
Note that, since TagLibibraryInfo reflects both TLD information
and taglib directive information, a TagInfo instance is
dependent on a taglib directive. This is probably a
design error, which may be fixed in the future.
this.tagName = tagName;
this.tagClassName = tagClassName;
this.bodyContent = bodycontent;
this.infoString = infoString;
this.tagLibrary = taglib;
this.tagExtraInfo = tagExtraInfo;
this.attributeInfo = attributeInfo;
this.displayName = displayName;
this.smallIcon = smallIcon;
this.largeIcon = largeIcon;
this.tagVariableInfo = tvi;
if (tagExtraInfo != null)
tagExtraInfo.setTagInfo(this);
| public TagInfo(String tagName, String tagClassName, String bodycontent, String infoString, TagLibraryInfo taglib, TagExtraInfo tagExtraInfo, TagAttributeInfo[] attributeInfo, String displayName, String smallIcon, String largeIcon, TagVariableInfo[] tvi, boolean dynamicAttributes)Constructor for TagInfo from data in the JSP 2.0 format for TLD.
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).
Note that, since TagLibibraryInfo reflects both TLD information
and taglib directive information, a TagInfo instance is
dependent on a taglib directive. This is probably a
design error, which may be fixed in the future.
this.tagName = tagName;
this.tagClassName = tagClassName;
this.bodyContent = bodycontent;
this.infoString = infoString;
this.tagLibrary = taglib;
this.tagExtraInfo = tagExtraInfo;
this.attributeInfo = attributeInfo;
this.displayName = displayName;
this.smallIcon = smallIcon;
this.largeIcon = largeIcon;
this.tagVariableInfo = tvi;
this.dynamicAttributes = dynamicAttributes;
if (tagExtraInfo != null)
tagExtraInfo.setTagInfo(this);
|
Methods Summary |
---|
public TagAttributeInfo[] | getAttributes()Attribute information (in the TLD) on this tag.
The return is an array describing the attributes of this tag, as
indicated in the TLD.
return attributeInfo;
| public java.lang.String | getBodyContent()The bodycontent information for this tag.
If the bodycontent is not defined for this
tag, the default of JSP will be returned.
return bodyContent;
| public java.lang.String | getDisplayName()Get the displayName.
return displayName;
| public java.lang.String | getInfoString()The information string for the tag.
return infoString;
| public java.lang.String | getLargeIcon()Get the path to the large icon.
return largeIcon;
| public java.lang.String | getSmallIcon()Get the path to the small icon.
return smallIcon;
| public java.lang.String | getTagClassName()Name of the class that provides the handler for this tag.
return tagClassName;
| public TagExtraInfo | getTagExtraInfo()The instance (if any) for extra tag information.
return tagExtraInfo;
| public TagLibraryInfo | getTagLibrary()The instance of TabLibraryInfo we belong to.
return tagLibrary;
| public java.lang.String | getTagName()The name of the Tag.
return tagName;
| public TagVariableInfo[] | getTagVariableInfos()Get TagVariableInfo objects associated with this TagInfo.
return tagVariableInfo;
| public VariableInfo[] | getVariableInfo(TagData data)Information on the scripting objects created by this tag at runtime.
This is a convenience method on the associated TagExtraInfo class.
VariableInfo[] result = null;
TagExtraInfo tei = getTagExtraInfo();
if (tei != null) {
result = tei.getVariableInfo( data );
}
return result;
| public boolean | hasDynamicAttributes()Get dynamicAttributes associated with this TagInfo.
return dynamicAttributes;
| public boolean | isValid(TagData data)Translation-time validation of the attributes.
This is a convenience method on the associated TagExtraInfo class.
TagExtraInfo tei = getTagExtraInfo();
if (tei == null) {
return true;
}
return tei.isValid(data);
| public void | setTagExtraInfo(TagExtraInfo tei)Set the instance for extra tag information.
tagExtraInfo = tei;
| public void | setTagLibrary(TagLibraryInfo tl)Set the TagLibraryInfo property.
Note that a TagLibraryInfo element is dependent
not just on the TLD information but also on the
specific taglib instance used. This means that
a fair amount of work needs to be done to construct
and initialize TagLib objects.
If used carefully, this setter can be used to avoid having to
create new TagInfo elements for each taglib directive.
tagLibrary = tl;
| public ValidationMessage[] | validate(TagData data)Translation-time validation of the attributes.
This is a convenience method on the associated TagExtraInfo class.
TagExtraInfo tei = getTagExtraInfo();
if( tei == null ) {
return null;
}
return tei.validate( data );
|
|