|
|||||||
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. |
|
Text |
asText()
Returns this node as a text 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. |
|
boolean |
isText()
Checks whether this is a text node. |
|
abstract String |
toString()
Returns a description of this node. |
|
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. |
Methods inherited from class java.lang.Object |
---|
equals, 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 nodepublic Text asText()
ClassCastException
- if this is not a text nodepublic Origin getOrigin()
public boolean isAttribute()
public boolean isComment()
public boolean isElement()
public boolean isNamespaceDecl()
public boolean isProcessingInstruction()
public boolean isText()
public abstract String toString()
toString
in class Object
public void visitBy(NodeVisitor v)
public <R,A> R visitBy(NodeVisitorParameterized<R,A> v, A arg)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |