public abstract class Node extends Object implements Serializable, Cloneable, org.walkmod.modelchecker.ConstrainedElement
| Constructor and Description |
|---|
Node() |
Node(int beginLine,
int beginColumn,
int endLine,
int endColumn) |
| Modifier and Type | Method and Description |
|---|---|
abstract <R,A> R |
accept(GenericVisitor<R,A> v,
A arg)
Accept method for visitor support.
|
abstract <A> void |
accept(VoidVisitor<A> v,
A arg)
Accept method for visitor support.
|
boolean |
check() |
abstract Object |
clone() |
protected <T extends Node> |
clone(List<T> original) |
protected <T extends Node> |
clone(T node) |
boolean |
contains(Node node2)
Return if this node contains another node according their line numbers and columns
|
void |
diableConstraints() |
void |
enableConstraints() |
boolean |
equals(Object obj) |
int |
getBeginColumn()
Return the begin column of this node.
|
int |
getBeginLine()
Return the begin line of this node.
|
abstract List<Node> |
getChildren() |
Node |
getCommonAncestor(Node other) |
List<org.walkmod.modelchecker.Constraint> |
getConstraints() |
Object |
getData()
Use this to retrieve additional information associated to this node.
|
int |
getEndColumn()
Return the end column of this node.
|
int |
getEndLine()
Return the end line of this node.
|
Node |
getParentNode() |
String |
getPrettySource(char indentationChar,
int indentationLevel,
int indentationSize) |
String |
getPrettySource(char indentationChar,
int indentationLevel,
int indentationSize,
List<Comment> comments) |
int |
hashCode() |
boolean |
isAncestorOf(Node other) |
boolean |
isInEqualLocation(Node node2)
Return if this node has the same columns and lines than another one.
|
boolean |
isNewNode()
Return if the node has not been retrieved from any input because its end column and begin line
is 0.
|
boolean |
isPreviousThan(Node node)
Return if this node is previous than another one according their line and column numbers
|
boolean |
remove() |
abstract boolean |
removeChild(Node child) |
abstract boolean |
replaceChildNode(Node oldChild,
Node newChild) |
protected boolean |
replaceChildNodeInList(Node oldChild,
Node newChild,
List list) |
protected void |
setAsParentNodeOf(List<? extends Node> childNodes) |
protected void |
setAsParentNodeOf(Node childNode) |
void |
setBeginColumn(int beginColumn)
Sets the begin column of this node.
|
void |
setBeginLine(int beginLine)
Sets the begin line of this node.
|
void |
setConstraints(List<org.walkmod.modelchecker.Constraint> constraints) |
void |
setData(Object data)
Use this to store additional information to this node.
|
void |
setEndColumn(int endColumn)
Sets the end column of this node.
|
void |
setEndLine(int endLine)
Sets the end line of this node.
|
String |
toString()
Return the String representation of this node.
|
protected void |
updateReferences(Object o) |
public Node()
public Node(int beginLine,
int beginColumn,
int endLine,
int endColumn)
public void setConstraints(List<org.walkmod.modelchecker.Constraint> constraints)
setConstraints in interface org.walkmod.modelchecker.ConstrainedElementpublic boolean remove()
public abstract boolean removeChild(Node child)
public List<org.walkmod.modelchecker.Constraint> getConstraints()
getConstraints in interface org.walkmod.modelchecker.ConstrainedElementpublic abstract <R,A> R accept(GenericVisitor<R,A> v, A arg)
R - the type the return value of the visitorA - the type the argument passed for the visitorv - the visitor implementationarg - any value relevant for the visitorpublic abstract <A> void accept(VoidVisitor<A> v, A arg)
A - the type the argument passed for the visitorv - the visitor implementationarg - any value relevant for the visitorpublic final int getBeginColumn()
public final int getBeginLine()
public final Object getData()
public final int getEndColumn()
public final int getEndLine()
public final void setBeginColumn(int beginColumn)
beginColumn - the begin column of this nodepublic final void setBeginLine(int beginLine)
beginLine - the begin line of this nodepublic final void setData(Object data)
data - additional information to this node.public final void setEndColumn(int endColumn)
endColumn - the end column of this nodepublic final void setEndLine(int endLine)
endLine - the end line of this nodepublic void enableConstraints()
public void diableConstraints()
public final String toString()
public boolean isNewNode()
public boolean contains(Node node2)
node2 - the probably contained nodepublic boolean isInEqualLocation(Node node2)
node2 - the node to comparepublic boolean isPreviousThan(Node node)
node - to comparepublic String getPrettySource(char indentationChar, int indentationLevel, int indentationSize)
public String getPrettySource(char indentationChar, int indentationLevel, int indentationSize, List<Comment> comments)
public Node getParentNode()
public boolean isAncestorOf(Node other)
protected void setAsParentNodeOf(Node childNode)
protected void updateReferences(Object o)
protected boolean replaceChildNodeInList(Node oldChild, Node newChild, List list)
protected <T extends Node> List<T> clone(List<T> original) throws CloneNotSupportedException
CloneNotSupportedExceptionprotected <T extends Node> T clone(T node) throws CloneNotSupportedException
CloneNotSupportedExceptionpublic abstract Object clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionpublic boolean check()
check in interface org.walkmod.modelchecker.ConstrainedElementCopyright © 2018. All rights reserved.