|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.yaml.snakeyaml.nodes.Node
public abstract class Node
Base class for all nodes.
The nodes form the node-graph described in the YAML Specification.
While loading, the node graph is usually created by the
Composer
, and later transformed into
application specific Java classes by the classes from the
org.yaml.snakeyaml.constructor
package.
Field Summary | |
---|---|
protected Mark |
endMark
|
protected boolean |
resolved
true when the tag is assigned by the resolver |
protected Boolean |
useClassConstructor
|
Constructor Summary | |
---|---|
Node(Tag tag,
Mark startMark,
Mark endMark)
|
Method Summary | |
---|---|
boolean |
equals(Object obj)
Two Nodes are never equal. |
Mark |
getEndMark()
|
abstract NodeId |
getNodeId()
For error reporting. |
Mark |
getStartMark()
|
Tag |
getTag()
Tag of this node. |
Class<? extends Object> |
getType()
|
int |
hashCode()
|
boolean |
isResolved()
Indicates if the tag was added by Resolver . |
boolean |
isTwoStepsConstruction()
Indicates if this node must be constructed in two steps. |
void |
setTag(Tag tag)
|
void |
setTwoStepsConstruction(boolean twoStepsConstruction)
|
void |
setType(Class<? extends Object> type)
|
void |
setUseClassConstructor(Boolean useClassConstructor)
|
boolean |
useClassConstructor()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Mark endMark
protected boolean resolved
protected Boolean useClassConstructor
Constructor Detail |
---|
public Node(Tag tag, Mark startMark, Mark endMark)
Method Detail |
---|
public Tag getTag()
Every node has a tag assigned. The tag is either local or global.
public Mark getEndMark()
public abstract NodeId getNodeId()
public Mark getStartMark()
public void setTag(Tag tag)
public final boolean equals(Object obj)
equals
in class Object
public Class<? extends Object> getType()
public void setType(Class<? extends Object> type)
public void setTwoStepsConstruction(boolean twoStepsConstruction)
public boolean isTwoStepsConstruction()
Two-step construction is required whenever a node is a child (direct or indirect) of it self. That is, if a recursive structure is build using anchors and aliases.
Set by Composer
, used during the
construction process.
Only relevant during loading.
true
if the node is self referenced.public final int hashCode()
hashCode
in class Object
public boolean useClassConstructor()
public void setUseClassConstructor(Boolean useClassConstructor)
public boolean isResolved()
Resolver
.
true
if the tag of this node was resolved
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |