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,
java.lang.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.
|
java.net.URI |
getAbsoluteFileLocation()
Attempts to find the absolute path (in URI form) to the source file represented by this AST.
|
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.
|
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, readConfiguration, replaceStatementInNode, setAndGetAsHandled, setChanged, setElementInASTCollection, setTop, top
public 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 java.net.URI getAbsoluteFileLocation()
AST
null
if this cannot be done. We don't yet know under which conditions this will happen.getAbsoluteFileLocation
in class AST<EclipseAST,EclipseNode,org.eclipse.jdt.internal.compiler.ast.ASTNode>
public int getSourceVersion()
AST
6
.getSourceVersion
in class AST<EclipseAST,EclipseNode,org.eclipse.jdt.internal.compiler.ast.ASTNode>
public int getLatestJavaSpecSupported()
AST
7
.
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, java.lang.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>
Copyright © 2009-2015 The Project Lombok Authors, licensed under the MIT licence.