Class Parser.ReusableToken
java.lang.Object
com.opensymphony.module.sitemesh.html.tokenizer.Parser.ReusableToken
- Enclosing class:
- Parser
-
Field Summary
FieldsFields inherited from interface com.opensymphony.module.sitemesh.html.Tag
CLOSE, CLOSE_MAGIC_COMMENT, EMPTY, OPEN, OPEN_MAGIC_COMMENT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintNumber of attributes in tag.intgetAttributeIndex(String name, boolean caseSensitive) Determine which attribute has the specified name.getAttributeName(int index) Get name of attribute.getAttributeValue(int index) Get value of an attribute.getAttributeValue(String name, boolean caseSensitive) Get value of an attribute.Get the complete tag in its original form, preserving original formatting.getName()Name of tag (ie.intgetType()Type of tag:
<blah> - Tag.OPEN
</blah> - Tag.CLOSE
<blah/> - Tag.EMPTYbooleanhasAttribute(String name, boolean caseSensitive) Determine if an attribute is present.voidWrite out the complete tag in its original form, preserving original formatting.
-
Field Details
-
attributeCount
public int attributeCount -
attributes
-
-
Constructor Details
-
ReusableToken
public ReusableToken()
-
-
Method Details
-
getName
Description copied from interface:TagName of tag (ie. element name). -
getType
public int getType()Description copied from interface:TagType of tag:
<blah> - Tag.OPEN
</blah> - Tag.CLOSE
<blah/> - Tag.EMPTY -
getContents
Description copied from interface:TagGet the complete tag in its original form, preserving original formatting. This has a slight overhead in that it needs to construct a String. For improved performance, use writeTo() instead.- Specified by:
getContentsin interfaceTag- Specified by:
getContentsin interfaceText- See Also:
-
writeTo
Description copied from interface:TagWrite out the complete tag in its original form, preserving original formatting. -
getAttributeCount
public int getAttributeCount()Description copied from interface:TagNumber of attributes in tag.- Specified by:
getAttributeCountin interfaceTag
-
getAttributeIndex
Description copied from interface:TagDetermine which attribute has the specified name.- Specified by:
getAttributeIndexin interfaceTag
-
getAttributeName
Description copied from interface:TagGet name of attribute.- Specified by:
getAttributeNamein interfaceTag
-
getAttributeValue
Description copied from interface:TagGet value of an attribute. If this is an empty attribute (i.e. just a name, without a value), null is returned.- Specified by:
getAttributeValuein interfaceTag
-
getAttributeValue
Description copied from interface:TagGet value of an attribute. If this is an empty attribute (i.e. just a name, without a value), null is returned.- Specified by:
getAttributeValuein interfaceTag
-
hasAttribute
Description copied from interface:TagDetermine if an attribute is present.- Specified by:
hasAttributein interfaceTag
-