com.jeffpalm.javaparser
Class ASTCompilationUnit
java.lang.Object
com.jeffpalm.javaparser.SimpleNode
com.jeffpalm.javaparser.ASTCompilationUnit
- All Implemented Interfaces:
- Node
public class ASTCompilationUnit
- extends SimpleNode
Top level unit for compilation which is able to sort the import statements.
- Since:
- jRefactory 2.9.0, created October 16, 2003
- Author:
- Mike Atkinson
Method Summary |
java.lang.Object |
jjtAccept(JavaParserVisitor visitor,
java.lang.Object data)
Accept the visitor. |
void |
sort(java.util.Comparator order)
Sorts the arrays |
Methods inherited from class com.jeffpalm.javaparser.SimpleNode |
addSpecial, childrenAccept, dump, dumpString, findChildrenOfType, findChildrenOfType, findChildrenOfType, getBeginColumn, getBeginLine, getEndColumn, getEndLine, getImage, getName, getScope, getSpecial, hasAnyChildren, init, isRequired, jjtAddChild, jjtAddFirstChild, jjtClose, jjtDeleteChild, jjtGetChild, jjtGetFirstChild, jjtGetID, jjtGetNumChildren, jjtGetParent, jjtInsertChild, jjtOpen, jjtSetParent, printModifiers, removeSpecial, setLineAndColumnInfo, setScope, testingOnly__setBeginColumn, testingOnly__setBeginLine, toString, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ASTCompilationUnit
public ASTCompilationUnit(int identifier)
- Constructor for the ASTCompilationUnit node.
- Parameters:
identifier
- The id of this node (JJTCOMPILATIONUNIT).
ASTCompilationUnit
public ASTCompilationUnit(JavaParser parser,
int identifier)
- Constructor for the ASTCompilationUnit node.
- Parameters:
parser
- The JavaParser that created this ASTCompilationUnit node.identifier
- The id of this node (JJTCOMPILATIONUNIT).
sort
public void sort(java.util.Comparator order)
- Sorts the arrays
- Parameters:
order
- the order of items
jjtAccept
public java.lang.Object jjtAccept(JavaParserVisitor visitor,
java.lang.Object data)
- Accept the visitor.
- Specified by:
jjtAccept
in interface Node
- Overrides:
jjtAccept
in class SimpleNode
- Parameters:
visitor
- An implementation of JavaParserVisitor that processes the ASTCompilationUnit node.data
- Some data being passed between the visitor methods.
- Returns:
- Usually the data parameter (possibly modified).