| java.lang.Object com.opensymphony.module.sitemesh.html.CustomTag
CustomTag | public class CustomTag implements Tag(Code) | | A CustomTag provides a mechanism to manipulate the contents of a Tag. The standard Tag implementations
are immutable, however CustomTag allows a copy to be taken of an immutable Tag that can then be manipulated.
See Also: Tag author: Joe Walnes |
Constructor Summary | |
public | CustomTag(String name, int type) | public | CustomTag(Tag tag) Create a CustomTag based on an existing Tag - this takes a copy of the Tag. |
Method Summary | |
public int | addAttribute(String name, String value) Add a new attribute. | public boolean | equals(Object o) | public int | getAttributeCount() | public int | getAttributeIndex(String name, boolean caseSensitive) | public String | getAttributeName(int index) | public String | getAttributeValue(int index) | public String | getAttributeValue(String name, boolean caseSensitive) | public String | getContents() | public String | getName() | public int | getType() | public boolean | hasAttribute(String name, boolean caseSensitive) | public int | hashCode() | public void | removeAttribute(int attributeIndex) Remove an attribute. | public void | removeAttribute(String name, boolean caseSensitive) Change the value of an attribute, or add an attribute if it does not already exist. | public void | setAttributeName(int attributeIndex, String name) Change the name of an existing attribute. | public void | setAttributeValue(String name, boolean caseSensitive, String value) Change the value of an attribute, or add an attribute if it does not already exist. | public void | setAttributeValue(int attributeIndex, String value) Change the value of an existing attribute. | public void | setName(String name) Change the name of the attribute. | public void | setType(int type) Change the type of the tag. | public String | toString() | public void | writeTo(CharArray out) |
CustomTag | public CustomTag(String name, int type)(Code) | | Type of tag:
<blah> - Tag.OPEN
</blah> - Tag.CLOSE
<blah/> - Tag.EMPTY
|
CustomTag | public CustomTag(Tag tag)(Code) | | Create a CustomTag based on an existing Tag - this takes a copy of the Tag.
|
addAttribute | public int addAttribute(String name, String value)(Code) | | Add a new attribute. This does not check for the existence of an attribute with the same name,
thus allowing duplicate attributes.
Parameters: name - Name of attribute to change. Parameters: value - New value of attribute or null for an HTML style empty attribute. Index of new attribute. |
getAttributeCount | public int getAttributeCount()(Code) | | |
getAttributeIndex | public int getAttributeIndex(String name, boolean caseSensitive)(Code) | | |
getAttributeName | public String getAttributeName(int index)(Code) | | |
getAttributeValue | public String getAttributeValue(int index)(Code) | | |
getAttributeValue | public String getAttributeValue(String name, boolean caseSensitive)(Code) | | |
getType | public int getType()(Code) | | Type of tag:
<blah> - Tag.OPEN
</blah> - Tag.CLOSE
<blah/> - Tag.EMPTY
|
hasAttribute | public boolean hasAttribute(String name, boolean caseSensitive)(Code) | | |
hashCode | public int hashCode()(Code) | | |
removeAttribute | public void removeAttribute(int attributeIndex)(Code) | | Remove an attribute.
|
removeAttribute | public void removeAttribute(String name, boolean caseSensitive)(Code) | | Change the value of an attribute, or add an attribute if it does not already exist.
Parameters: name - Name of attribute to remove. Parameters: caseSensitive - Whether the name should be treated as case sensitive. |
setAttributeName | public void setAttributeName(int attributeIndex, String name)(Code) | | Change the name of an existing attribute.
|
setAttributeValue | public void setAttributeValue(String name, boolean caseSensitive, String value)(Code) | | Change the value of an attribute, or add an attribute if it does not already exist.
Parameters: name - Name of attribute to change. Parameters: caseSensitive - Whether the name should be treated as case sensitive when searching for an existing value. Parameters: value - New value of attribute or null for an HTML style empty attribute. |
setAttributeValue | public void setAttributeValue(int attributeIndex, String value)(Code) | | Change the value of an existing attribute. The value may be null for an HTML style empty attribute.
|
setName | public void setName(String name)(Code) | | Change the name of the attribute.
|
setType | public void setType(int type)(Code) | | Change the type of the tag.
Type of tag:
<blah> - Tag.OPEN
</blah> - Tag.CLOSE
<blah/> - Tag.EMPTY
|
|
|