|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectxjavadoc.DefaultXTag
public class DefaultXTag
| Field Summary | |
|---|---|
private java.util.List |
_attributeNames
Ordered List of attribute names |
private java.util.Map |
_attributes
attribute map |
private XDoc |
_doc
|
private int |
_hash
|
private boolean |
_isDirty
indicate dirty state |
private boolean |
_isParsed
tag parse status |
private int |
_lineNumber
|
private java.lang.String |
_name
tag name |
private java.util.Set |
_tagListeners
tag listeners interested in changes. |
private java.lang.String |
_value
string representation of tag |
private XJavaDoc |
_xJavaDoc
|
static int |
instanceCount
|
| Constructor Summary | |
|---|---|
DefaultXTag()
|
|
| Method Summary | |
|---|---|
void |
addTagListener(XTagListener tagListener)
add doc listener interested in chages |
private void |
ensureTagListenersInitialised()
|
boolean |
equals(java.lang.Object o)
|
protected void |
fail(java.lang.String message)
Utility method that should be called from validate() in
case ov a validation failure. |
private void |
fireTagChanged()
fire tagChanged event |
java.util.Collection |
getAttributeNames()
Returns all tag parameters with the given name, or an empty List if none exist; |
java.lang.String |
getAttributeValue(java.lang.String attributeName)
Returns the first tag parameter with the given name, or null if none exist; |
XDoc |
getDoc()
Returns the XDoc object we belong to. |
java.lang.String |
getInfo()
|
int |
getLineNumber()
|
java.lang.String |
getName()
Returns the full name of the tag, excluding the @ |
java.lang.String |
getValue()
Returns the full value of the tag. |
int |
hashCode()
|
(package private) void |
init(java.lang.String name,
java.lang.String value,
XDoc doc,
int lineNumber)
Sets the name and value. |
private void |
parse()
Given the raw javadoc tag content as the value parameter parses it and sets the parameter. |
java.lang.String |
removeAttribute(java.lang.String attributeName)
Removes an attribute |
void |
removeTagListener(XTagListener tagListener)
remove doc listener |
private void |
resetValue()
|
private void |
setAttribute_Impl(java.lang.String attributeName,
java.lang.String attributeValue)
|
void |
setAttribute(java.lang.String attributeName,
java.lang.String attributeValue)
Adds a parameter |
private static int |
skipWhitespace(java.lang.String s,
int i)
Skips whitespaces, starting from index i till the first non-whitespace character or end of s and returns the new index. |
void |
validate()
Validates the tag |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static int instanceCount
private java.lang.String _name
private java.lang.String _value
private java.util.Map _attributes
private java.util.List _attributeNames
private boolean _isParsed
private int _hash
private boolean _isDirty
private XDoc _doc
private java.util.Set _tagListeners
private int _lineNumber
private XJavaDoc _xJavaDoc
| Constructor Detail |
|---|
public DefaultXTag()
| Method Detail |
|---|
private static int skipWhitespace(java.lang.String s,
int i)
s - Describe what the parameter doesi - Describe what the parameter does
public final XDoc getDoc()
XTag
getDoc in interface XTagpublic final java.lang.String getAttributeValue(java.lang.String attributeName)
getAttributeValue in interface XTagattributeName - Describe what the parameter does
public final java.util.Collection getAttributeNames()
getAttributeNames in interface XTagpublic final java.lang.String getName()
getName in interface XTagpublic final java.lang.String getValue()
getValue in interface XTagpublic final int getLineNumber()
getLineNumber in interface XTagpublic final java.lang.String getInfo()
getInfo in interface XTag
public final void setAttribute(java.lang.String attributeName,
java.lang.String attributeValue)
setAttribute in interface XTagattributeName - The new Attribute valueattributeValue - The new Attribute valuepublic final void addTagListener(XTagListener tagListener)
addTagListener in interface XTagtagListener - The feature to be added to the TagListener attributepublic final void removeTagListener(XTagListener tagListener)
removeTagListener in interface XTagtagListener - public final java.lang.String removeAttribute(java.lang.String attributeName)
removeAttribute in interface XTagattributeName - atribute to remove
public final boolean equals(java.lang.Object o)
equals in interface XTagequals in class java.lang.Objectpublic final int hashCode()
hashCode in interface XTaghashCode in class java.lang.Object
public void validate()
throws TagValidationException
validate in interface XTagTagValidationException
protected final void fail(java.lang.String message)
throws TagValidationException
validate() in
case ov a validation failure. Throws a new TagValidationException
with
message - the message to include
TagValidationException - always thrown.
final void init(java.lang.String name,
java.lang.String value,
XDoc doc,
int lineNumber)
name - value - doc - lineNumber -
private final void setAttribute_Impl(java.lang.String attributeName,
java.lang.String attributeValue)
private final void ensureTagListenersInitialised()
private void fireTagChanged()
private final void parse()
private final void resetValue()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||