com.github.antlrjavaparser.api
Class Node

java.lang.Object
  extended by com.github.antlrjavaparser.api.Node
Direct Known Subclasses:
BodyDeclaration, CatchClause, CatchParameter, Comment, CompilationUnit, Expression, ImportDeclaration, MemberValuePair, PackageDeclaration, Parameter, Resource, Statement, Type, TypeParameter, VariableDeclarator, VariableDeclaratorId

public abstract class Node
extends Object

Abstract class for all nodes of the AST.

Author:
Julio Vilmar Gesser

Constructor Summary
Node()
           
Node(int beginLine, int beginColumn, int endLine, int endColumn)
           
 
Method Summary
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 equals(Object obj)
           
 int getBeginColumn()
          Return the begin column of this node.
 int getBeginLine()
          Return the begin line of this node.
 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.
 int hashCode()
           
 void setBeginColumn(int beginColumn)
          Sets the begin column of this node.
 void setBeginLine(int beginLine)
          Sets the begin line of this node.
 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.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Node

public Node()

Node

public Node(int beginLine,
            int beginColumn,
            int endLine,
            int endColumn)
Method Detail

accept

public abstract <R,A> R accept(GenericVisitor<R,A> v,
                               A arg)
Accept method for visitor support.

Type Parameters:
R - the type the return value of the visitor
A - the type the argument passed for the visitor
Parameters:
v - the visitor implementation
arg - any value relevant for the visitor
Returns:
the result of the visit

accept

public abstract <A> void accept(VoidVisitor<A> v,
                                A arg)
Accept method for visitor support.

Type Parameters:
A - the type the argument passed for the visitor
Parameters:
v - the visitor implementation
arg - any value relevant for the visitor

getBeginColumn

public final int getBeginColumn()
Return the begin column of this node.

Returns:
the begin column of this node

getBeginLine

public final int getBeginLine()
Return the begin line of this node.

Returns:
the begin line of this node

getData

public final Object getData()
Use this to retrieve additional information associated to this node.


getEndColumn

public final int getEndColumn()
Return the end column of this node.

Returns:
the end column of this node

getEndLine

public final int getEndLine()
Return the end line of this node.

Returns:
the end line of this node

setBeginColumn

public final void setBeginColumn(int beginColumn)
Sets the begin column of this node.

Parameters:
beginColumn - the begin column of this node

setBeginLine

public final void setBeginLine(int beginLine)
Sets the begin line of this node.

Parameters:
beginLine - the begin line of this node

setData

public final void setData(Object data)
Use this to store additional information to this node.


setEndColumn

public final void setEndColumn(int endColumn)
Sets the end column of this node.

Parameters:
endColumn - the end column of this node

setEndLine

public final void setEndLine(int endLine)
Sets the end line of this node.

Parameters:
endLine - the end line of this node

toString

public final String toString()
Return the String representation of this node.

Overrides:
toString in class Object
Returns:
the String representation of this node

hashCode

public final int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2013. All Rights Reserved.