com.jeffpalm.javaparser
Interface Node

All Known Implementing Classes:
AccessNode, ASTActualTypeArgument, ASTAdditiveExpression, ASTAllocationExpression, ASTAndExpression, ASTAnnotation, ASTAnnotationMethodDeclaration, ASTAnnotationTypeDeclaration, ASTAnnotationTypeMemberDeclaration, ASTArgumentList, ASTArguments, ASTArrayDimsAndInits, ASTArrayInitializer, ASTAssertionStatement, ASTAssignmentOperator, ASTBlock, ASTBlockStatement, ASTBooleanLiteral, ASTBreakStatement, ASTCastExpression, ASTClassBody, ASTClassBodyDeclaration, ASTClassDeclaration, ASTClassOrInterfaceType, ASTCompilationUnit, ASTConditionalAndExpression, ASTConditionalExpression, ASTConditionalOrExpression, ASTConstantDeclaration, ASTConstructorDeclaration, ASTContinueStatement, ASTDoStatement, ASTEmptyStatement, ASTEnumDeclaration, ASTEnumElement, ASTEqualityExpression, ASTExclusiveOrExpression, ASTExplicitConstructorInvocation, ASTExpression, ASTFieldDeclaration, ASTForInit, ASTFormalParameter, ASTFormalParameters, ASTForStatement, ASTForUpdate, ASTGenericDeclaration, ASTGenericDeclarationPart, ASTGenericNameList, ASTIdentifier, ASTIfStatement, ASTImportDeclaration, ASTInclusiveOrExpression, ASTInitializer, ASTInstanceOfExpression, ASTInterfaceBody, ASTInterfaceDeclaration, ASTInterfaceMemberDeclaration, ASTLabeledStatement, ASTLiteral, ASTLocalVariableDeclaration, ASTMemberValue, ASTMemberValueArrayInitializer, ASTMemberValuePair, ASTMemberValuePairs, ASTMethodDeclaration, ASTMethodDeclarator, ASTMultiplicativeExpression, ASTName, ASTNameList, ASTNestedClassDeclaration, ASTNestedInterfaceDeclaration, ASTNullLiteral, ASTPackageDeclaration, ASTPostfixExpression, ASTPreDecrementExpression, ASTPreIncrementExpression, ASTPrimaryExpression, ASTPrimaryPrefix, ASTPrimarySuffix, ASTPrimitiveType, ASTReferenceType, ASTReferenceTypeList, ASTRelationalExpression, ASTResultType, ASTReturnStatement, ASTShiftExpression, ASTStatement, ASTStatementExpression, ASTStatementExpressionList, ASTSwitchLabel, ASTSwitchStatement, ASTSynchronizedStatement, ASTThrowStatement, ASTTryStatement, ASTType, ASTTypeArguments, ASTTypeDeclaration, ASTTypeParameter, ASTTypeParameterList, ASTTypeParameters, ASTUnaryExpression, ASTUnaryExpressionNotPlusMinus, ASTUnmodifiedClassDeclaration, ASTUnmodifiedInterfaceDeclaration, ASTVariableDeclarator, ASTVariableDeclaratorId, ASTVariableInitializer, ASTWhileStatement, NamedNode, SimpleNode

public interface Node

All AST nodes must implement this interface. It provides basic machinery for constructing the parent and child relationships between nodes.

Since:
jRefactory 2.9.0, created October 16, 2003
Author:
Mike Atkinson

Method Summary
 int getBeginColumn()
          Gets the beginColumn attribute of the Node.
 int getBeginLine()
          Gets the beginLine attribute of the Node.
 int getEndColumn()
          Gets the endColumn attribute of the Node.
 int getEndLine()
          Gets the endLine attribute of the Node.
 java.lang.Object jjtAccept(JavaParserVisitor visitor, java.lang.Object data)
          Accept the visitor.
 void jjtAddChild(Node n, int i)
          This method tells the node to add its argument to the node's list of children.
 void jjtAddFirstChild(Node n)
          This method tells the node to add its argument to the node's list of children.
 void jjtClose()
          This method is called after all the child nodes have been added.
 void jjtDeleteChild(int i)
          Description of the Method
 Node jjtGetChild(int i)
          This method returns a child node.
 Node jjtGetFirstChild()
          This method returns a child node.
 int jjtGetNumChildren()
          Return the number of children the node has.
 Node jjtGetParent()
          Description of the Method
 void jjtInsertChild(Node n, int i)
          Description of the Method
 void jjtOpen()
          This method is called after the node has been made the current node.
 void jjtSetParent(Node n)
          This pair of methods are used to inform the node of its parent.
 

Method Detail

getBeginLine

int getBeginLine()
Gets the beginLine attribute of the Node.

Returns:
The beginLine value

getBeginColumn

int getBeginColumn()
Gets the beginColumn attribute of the Node.

Returns:
The beginColumn value

getEndLine

int getEndLine()
Gets the endLine attribute of the Node.

Returns:
The endLine value

getEndColumn

int getEndColumn()
Gets the endColumn attribute of the Node.

Returns:
The endColumn value

jjtOpen

void jjtOpen()
This method is called after the node has been made the current node. It indicates that child nodes can now be added to it.


jjtClose

void jjtClose()
This method is called after all the child nodes have been added.


jjtSetParent

void jjtSetParent(Node n)
This pair of methods are used to inform the node of its parent.

Parameters:
n - Description of Parameter

jjtGetParent

Node jjtGetParent()
Description of the Method

Returns:
Description of the Returned Value

jjtAddChild

void jjtAddChild(Node n,
                 int i)
This method tells the node to add its argument to the node's list of children.

Parameters:
n - Description of Parameter
i - Description of Parameter

jjtAddFirstChild

void jjtAddFirstChild(Node n)
This method tells the node to add its argument to the node's list of children.

Same as jjtAddChild(n, 0);

Parameters:
n - Description of Parameter

jjtInsertChild

void jjtInsertChild(Node n,
                    int i)
Description of the Method

Parameters:
n - Description of the Parameter
i - Description of the Parameter

jjtDeleteChild

void jjtDeleteChild(int i)
Description of the Method

Parameters:
i - Description of the Parameter

jjtGetChild

Node jjtGetChild(int i)
This method returns a child node. The children are numbered from zero, left to right.

Parameters:
i - Description of Parameter
Returns:
Description of the Returned Value

jjtGetFirstChild

Node jjtGetFirstChild()
This method returns a child node. The children are numbered from zero, left to right.

Same as jjtGetFirstChild();

Returns:
Description of the Returned Value

jjtGetNumChildren

int jjtGetNumChildren()
Return the number of children the node has.

Returns:
Description of the Returned Value

jjtAccept

java.lang.Object jjtAccept(JavaParserVisitor visitor,
                           java.lang.Object data)
Accept the visitor.

Parameters:
visitor - Description of Parameter
data - Description of Parameter
Returns:
Description of the Returned Value