|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.brics.xact.Node
public abstract class Node
Base class for all nodes.
Constructor Summary | |
---|---|
Node(Origin origin)
Constructs a new node. |
Method Summary | ||
---|---|---|
Attribute |
asAttribute()
Returns this node as an attribute node. |
|
Comment |
asComment()
Returns this node as a comment node. |
|
Element |
asElement()
Returns this node as an element node. |
|
NamespaceDecl |
asNamespaceDecl()
Returns this node as a namespace declaration node. |
|
ProcessingInstruction |
asProcessingInstruction()
Returns this node as a processing instruction node. |
|
(package private) TempNode |
asTemplate()
Returns this node as an XML template content node. |
|
Text |
asText()
Returns this node as a text node. |
|
(package private) static String |
expanded(String namespace,
String localname)
Builds an expanded name from an optional namespace URI and a local name. |
|
(package private) static AttrNode |
follow(AttrNode a)
Returns the replacement node if forwarded, otherwise returns the node itself. |
|
(package private) static NamespaceDecl |
follow(NamespaceDecl a)
Returns the replacement node if forwarded, otherwise returns the node itself. |
|
(package private) static Node |
follow(Node n)
Returns the replacement node if forwarded, otherwise returns the node itself. |
|
(package private) static XML |
follow(XML x)
Returns the replacement node if forwarded, otherwise returns the node itself. |
|
(package private) void |
forward(Node replacement)
Forwards this node. |
|
Origin |
getOrigin()
Returns the origin of this node, or null if absent. |
|
boolean |
isAttribute()
Checks whether this is an attribute node. |
|
boolean |
isComment()
Checks whether this is an comment node. |
|
boolean |
isElement()
Checks whether this is an element node. |
|
boolean |
isNamespaceDecl()
Checks whether this is a namespace declaration node. |
|
boolean |
isProcessingInstruction()
Checks whether this is an processing instruction node. |
|
(package private) boolean |
isTemplate()
Checks whether this is an XML template content node. |
|
boolean |
isText()
Checks whether this is a text node. |
|
abstract String |
toString()
Returns a description of this node. |
|
(package private) abstract void |
visitAnyBy(AnyNodeVisitor v)
Visits this node by the given any-node visitor. |
|
void |
visitBy(NodeVisitor v)
Visits this node by the given visitor. |
|
|
visitBy(NodeVisitorParameterized<R,A> v,
A arg)
Visits this node by the given visitor. |
|
(package private) abstract void |
visitNormalizedBy(NodeVisitor v)
Visits this normalized node it by the given visitor. |
|
(package private) abstract
|
visitNormalizedBy(NodeVisitorParameterized<R,A> v,
A arg)
Visits this normalized node it by the given visitor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Node(Origin origin)
Method Detail |
---|
public Attribute asAttribute()
ClassCastException
- if this is not an attribute nodepublic Comment asComment()
ClassCastException
- if this is not a comment nodepublic Element asElement()
ClassCastException
- if this is not an element nodepublic NamespaceDecl asNamespaceDecl()
ClassCastException
- if this is not a namespace declaration nodepublic ProcessingInstruction asProcessingInstruction()
ClassCastException
- if this is not a processing instruction nodeTempNode asTemplate()
ClassCastException
- if this is not an XML nodepublic Text asText()
ClassCastException
- if this is not a text nodestatic String expanded(String namespace, String localname)
static AttrNode follow(AttrNode a)
follow(Node)
.
static NamespaceDecl follow(NamespaceDecl a)
follow(Node)
.
static Node follow(Node n)
follow
before inspecting the type of a node.
Public methods in this package should never return a forwarded node.
static XML follow(XML x)
follow(Node)
.
void forward(Node replacement)
public Origin getOrigin()
public boolean isAttribute()
public boolean isComment()
public boolean isElement()
public boolean isNamespaceDecl()
public boolean isProcessingInstruction()
boolean isTemplate()
public boolean isText()
public abstract String toString()
toString
in class Object
abstract void visitAnyBy(AnyNodeVisitor v)
public void visitBy(NodeVisitor v)
public <R,A> R visitBy(NodeVisitorParameterized<R,A> v, A arg)
abstract void visitNormalizedBy(NodeVisitor v)
abstract <R,A> R visitNormalizedBy(NodeVisitorParameterized<R,A> v, A arg)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |