public class EclipseAST extends AST<EclipseAST,EclipseNode,org.eclipse.jdt.internal.compiler.ast.ASTNode>
AST.FieldAccess, AST.Kind| Constructor and Description |
|---|
EclipseAST(org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration ast)
Creates a new EclipseAST of the provided Compilation Unit.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
addProblemToCompilationResult(char[] fileNameArray,
org.eclipse.jdt.internal.compiler.CompilationResult result,
boolean isWarning,
String message,
int sourceStart,
int sourceEnd)
Adds a problem to the provided CompilationResult object so that it will show up
in the Problems/Warnings view.
|
protected EclipseNode |
buildTree(org.eclipse.jdt.internal.compiler.ast.ASTNode node,
AST.Kind kind)
Build an AST.Node object for the stated internal (javac/Eclipse) AST Node object.
|
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 org.eclipse.jdt.internal.compiler.ast.ASTNode>> |
getStatementTypes()
For Eclipse, only Statement counts, as Expression is a subclass of it, even though this isn't
entirely correct according to the JLS spec (only some expressions can be used as statements, not all of them).
|
boolean |
isCompleteParse()
Eclipse starts off with a 'diet' parse which leaves method bodies blank, amongst other shortcuts.
|
void |
rebuild(boolean force)
Call this method to move an EclipseAST generated for a diet parse to rebuild itself for the full parse -
with filled in method bodies and such.
|
void |
traverse(EclipseASTVisitor 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, setElementInASTCollection, setTop, shouldDrill, toppublic EclipseAST(org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration ast)
ast - The compilation unit, which serves as the top level node in the tree to be built.public int getSourceVersion()
AST6.getSourceVersion in class AST<EclipseAST,EclipseNode,org.eclipse.jdt.internal.compiler.ast.ASTNode>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<EclipseAST,EclipseNode,org.eclipse.jdt.internal.compiler.ast.ASTNode>public void traverse(EclipseASTVisitor visitor)
public boolean isCompleteParse()
public static void addProblemToCompilationResult(char[] fileNameArray,
org.eclipse.jdt.internal.compiler.CompilationResult result,
boolean isWarning,
String message,
int sourceStart,
int sourceEnd)
public void rebuild(boolean force)
protected EclipseNode buildTree(org.eclipse.jdt.internal.compiler.ast.ASTNode node, AST.Kind kind)
buildTree in class AST<EclipseAST,EclipseNode,org.eclipse.jdt.internal.compiler.ast.ASTNode>protected Collection<Class<? extends org.eclipse.jdt.internal.compiler.ast.ASTNode>> getStatementTypes()
getStatementTypes in class AST<EclipseAST,EclipseNode,org.eclipse.jdt.internal.compiler.ast.ASTNode>Copyright © 2009-2013 The Project Lombok Authors, licensed under the MIT licence.