Class FlyweightProcessingInstruction
java.lang.Object
org.dom4j.tree.AbstractNode
org.dom4j.tree.AbstractProcessingInstruction
org.dom4j.tree.FlyweightProcessingInstruction
- All Implemented Interfaces:
Serializable, Cloneable, Node, ProcessingInstruction
- Direct Known Subclasses:
DefaultProcessingInstruction
FlyweightProcessingInstruction is a Flyweight pattern
implementation of a singly linked, read-only XML Processing Instruction.
This node could be shared across documents and elements though it does not support the parent relationship.
- Version:
- $Revision: 1.7 $
- Author:
- James Strachan
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringThe target of the PIprotected StringThe values for the PI as a StringThe values for the PI in name/value pairsFields inherited from class AbstractNode
NODE_TYPE_NAMESFields inherited from interface Node
ANY_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 Summary
ConstructorsConstructorDescriptionA default constructor for implementors to use.FlyweightProcessingInstruction(String target, String text) This will create a new PI with the given target and valuesFlyweightProcessingInstruction(String target, Map<String, String> values) This will create a new PI with the given target and values -
Method Summary
Modifier and TypeMethodDescriptionprotected NodecreateXPathResult(Element parent) This method is the equivalent to theNode.getName()method.getText()Returns the text of this node.Returns the value of a specific name in the PI.DOCUMENT ME!voidThis method is the equivalent to theNode.setName(String)method.Methods inherited from class AbstractProcessingInstruction
accept, asXML, getName, getNodeType, getPath, getUniquePath, parseValues, removeValue, setName, setValue, setValues, toString, toString, writeMethods inherited from class AbstractNode
asXPathResult, clone, createPattern, createXPath, createXPathFilter, detach, getDocument, getDocumentFactory, getNodeTypeName, getParent, getPath, getStringValue, getUniquePath, hasContent, isReadOnly, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, setDocument, setParent, setText, supportsParent, valueOfMethods inherited from class Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Node
asXPathResult, clone, createXPath, detach, getDocument, getNodeTypeName, getParent, getPath, getStringValue, getUniquePath, hasContent, isReadOnly, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, setDocument, setParent, setText, supportsParent, valueOf
-
Field Details
-
target
The target of the PI -
text
The values for the PI as a String -
values
-
-
Constructor Details
-
FlyweightProcessingInstruction
public FlyweightProcessingInstruction()A default constructor for implementors to use. -
FlyweightProcessingInstruction
-
FlyweightProcessingInstruction
-
-
Method Details
-
getTarget
Description copied from interface:ProcessingInstructionThis method is the equivalent to theNode.getName()method. It is added for clarity.- Returns:
- the target of this PI
-
setTarget
Description copied from interface:ProcessingInstructionThis method is the equivalent to theNode.setName(String)method. It is added for clarity.- Parameters:
target- DOCUMENT ME!
-
getText
Description copied from interface:NodeReturns the text of this node.
- Specified by:
getTextin interfaceNode- Specified by:
getTextin interfaceProcessingInstruction- Overrides:
getTextin classAbstractNode- Returns:
- the text for this node.
-
getValue
Description copied from interface:ProcessingInstructionReturns the value of a specific name in the PI.
- Parameters:
name- is the name of the attribute to lookup.- Returns:
- the value of the named attribute
-
getValues
Description copied from interface:ProcessingInstructionDOCUMENT ME!- Returns:
- the values for this processing instruction as a Map
-
createXPathResult
- Overrides:
createXPathResultin classAbstractNode
-