AST.FieldAccess, AST.Kind| Constructor and Description |
|---|
JavacAST(Messager messager,
com.sun.tools.javac.util.Context context,
com.sun.tools.javac.tree.JCTree.JCCompilationUnit top)
Creates a new JavacAST of the provided Compilation Unit.
|
| Modifier and Type | Method and Description |
|---|---|
protected JavacNode |
buildTree(com.sun.tools.javac.tree.JCTree node,
AST.Kind kind)
Build an AST.Node object for the stated internal (javac/Eclipse) AST Node object.
|
com.sun.tools.javac.util.Context |
getContext() |
int |
getLatestJavaSpecSupported()
Returns the latest version of the java language specification supported by the host compiler.
|
int |
getSourceVersion()
Returns the JLS spec version that the compiler uses to parse and compile this AST.
|
protected Collection<Class<? extends com.sun.tools.javac.tree.JCTree>> |
getStatementTypes()
For javac, both JCExpression and JCStatement are considered as valid children types.
|
com.sun.tools.javac.code.Symtab |
getSymbolTable() |
lombok.javac.JavacTreeMaker |
getTreeMaker() |
com.sun.tools.javac.model.JavacTypes |
getTypesUtil() |
protected void |
setElementInASTCollection(Field field,
Object refField,
List<Collection<?>> chain,
Collection<?> collection,
int idx,
com.sun.tools.javac.tree.JCTree newN)
Override if your AST collection does not support the set method.
|
com.sun.tools.javac.util.Name |
toName(String name) |
void |
traverse(JavacASTVisitor visitor)
Runs through the entire AST, starting at the compilation unit, calling the provided visitor's visit methods
for each node, depth first.
|
buildWithField, clearChanged, clearState, fieldsOf, get, getFileName, getImportList, getNodeMap, getPackageDeclaration, isChanged, putInMap, replaceStatementInNode, setAndGetAsHandled, setChanged, setTop, shouldDrill, toppublic JavacAST(Messager messager, com.sun.tools.javac.util.Context context, com.sun.tools.javac.tree.JCTree.JCCompilationUnit top)
messager - A Messager for warning and error reporting.context - A Context object for interfacing with the compiler.top - The compilation unit, which serves as the top level node in the tree to be built.public com.sun.tools.javac.util.Context getContext()
public void traverse(JavacASTVisitor visitor)
public int getSourceVersion()
AST6.getSourceVersion in class AST<JavacAST,JavacNode,com.sun.tools.javac.tree.JCTree>public int getLatestJavaSpecSupported()
AST7.
NB: Even if -source (lower than maximum) is specified, this method still returns the maximum supported number.getLatestJavaSpecSupported in class AST<JavacAST,JavacNode,com.sun.tools.javac.tree.JCTree>public com.sun.tools.javac.util.Name toName(String name)
public lombok.javac.JavacTreeMaker getTreeMaker()
public com.sun.tools.javac.code.Symtab getSymbolTable()
public com.sun.tools.javac.model.JavacTypes getTypesUtil()
Types of javac. Contains a few extra methods beyond
the ones listed in the official annotation API interface.protected JavacNode buildTree(com.sun.tools.javac.tree.JCTree node, AST.Kind kind)
protected Collection<Class<? extends com.sun.tools.javac.tree.JCTree>> getStatementTypes()
getStatementTypes in class AST<JavacAST,JavacNode,com.sun.tools.javac.tree.JCTree>protected void setElementInASTCollection(Field field, Object refField, List<Collection<?>> chain, Collection<?> collection, int idx, com.sun.tools.javac.tree.JCTree newN) throws IllegalAccessException
setElementInASTCollection in class AST<JavacAST,JavacNode,com.sun.tools.javac.tree.JCTree>field - The field that contains the array or list of AST nodes.refField - The object that you can supply to the field's get method.chain - If the collection is immutable, you need to update the pointer to the collection in each element in the chain.IllegalAccessException - This exception won't happen, but we allow you to throw it so you can avoid having to catch it.Copyright © 2009-2013 The Project Lombok Authors, licensed under the MIT licence.