public class FlyweightAttribute extends AbstractAttribute
FlyweightAttribute is a Flyweight pattern implementation of a
singly linked, read-only XML Attribute.
This node could be shared across documents and elements though it does not support the parent relationship.
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
value
The value of the
Attribute |
NODE_TYPE_NAMESANY_NODE, ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_REFERENCE_NODE, MAX_NODE_TYPE, NAMESPACE_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE, UNKNOWN_NODE| Constructor and Description |
|---|
FlyweightAttribute(QName qname) |
FlyweightAttribute(QName qname,
java.lang.String value) |
FlyweightAttribute(java.lang.String name,
java.lang.String value)
Creates the
Attribute with the specified local name and
value. |
FlyweightAttribute(java.lang.String name,
java.lang.String value,
Namespace namespace)
Creates the
Attribute with the specified local name, value
and Namespace. |
| Modifier and Type | Method and Description |
|---|---|
QName |
getQName()
Returns the
QName of this attribute which represents the
local name, the qualified name and the Namespace. |
java.lang.String |
getValue()
Returns the value of the attribute.
|
accept, asXML, createXPathResult, getData, getName, getNamespace, getNamespacePrefix, getNamespaceURI, getNodeType, getPath, getQualifiedName, getText, getUniquePath, setData, setNamespace, setText, setValue, toString, writeasXPathResult, clone, createPattern, createXPath, createXPathFilter, detach, getDocument, getDocumentFactory, getNodeTypeName, getParent, getPath, getStringValue, getUniquePath, hasContent, isReadOnly, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, setDocument, setName, setParent, supportsParent, valueOfequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitasXPathResult, clone, createXPath, detach, getDocument, getNodeTypeName, getParent, getPath, getStringValue, getUniquePath, hasContent, isReadOnly, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, setDocument, setName, setParent, supportsParent, valueOfpublic FlyweightAttribute(QName qname)
public FlyweightAttribute(QName qname, java.lang.String value)
public FlyweightAttribute(java.lang.String name,
java.lang.String value)
Attribute with the specified local name and
value.name - is the name of the attributevalue - is the value of the attributepublic FlyweightAttribute(java.lang.String name,
java.lang.String value,
Namespace namespace)
Attribute with the specified local name, value
and Namespace.name - is the name of the attributevalue - is the value of the attributenamespace - is the namespace of the attributepublic java.lang.String getValue()
AttributeNode.getText()method.