Example usage for Java org.eclipse.jdt.core.dom ASTParser fields, constructors, methods, implement or subclass
The text is from its open source code.
int | K_EXPRESSION Kind constant used to request that the source be parsed as a single expression. |
int | K_STATEMENTS Kind constant used to request that the source be parsed as a sequence of statements. |
int | K_CLASS_BODY_DECLARATIONS Kind constant used to request that the source be parsed as a sequence of class body declarations. |
int | K_COMPILATION_UNIT Kind constant used to request that the source be parsed as a compilation unit. |
ASTNode | createAST(IProgressMonitor monitor) Creates an abstract syntax tree. |
void | createASTs(String[] sourceFilePaths, String[] encodings, String[] bindingKeys, FileASTRequestor requestor, IProgressMonitor monitor) Creates ASTs for a batch of compilation units. |
void | createASTs(ICompilationUnit[] compilationUnits, String[] bindingKeys, ASTRequestor requestor, IProgressMonitor monitor) Creates ASTs for a batch of compilation units. |
IBinding[] | createBindings(IJavaElement[] elements, IProgressMonitor monitor) Creates bindings for a batch of Java elements. |
ASTParser | newParser(int level) Creates a new object for creating a Java abstract syntax tree (AST) following the specified set of API rules. |
void | setBindingsRecovery(boolean enabled) Requests that the compiler should perform bindings recovery. |
void | setCompilerOptions(Map Sets the compiler options to be used when parsing. |
void | setEnvironment(String[] classpathEntries, String[] sourcepathEntries, String[] encodings, boolean includeRunningVMBootclasspath) Sets the environment to be used when no IJavaProject is available. |
void | setFocalPosition(int position) Requests an abridged abstract syntax tree. |
void | setIgnoreMethodBodies(boolean enabled) Requests an abstract syntax tree without method bodies. |
void | setKind(int kind) Sets the kind of constructs to be parsed from the source. |
void | setProject(IJavaProject project) Sets the Java project used when resolving bindings. |
void | setResolveBindings(boolean enabled) Requests that the compiler should provide binding information for the AST nodes it creates. |
void | setSource(char[] source) Sets the source code to be parsed. |
void | setSource(ICompilationUnit source) Sets the source code to be parsed. |
void | setSource(IClassFile source) Sets the source code to be parsed. |
void | setSource(ITypeRoot source) Sets the source code to be parsed. |
void | setSourceRange(int offset, int length) Sets the subrange of the source code to be parsed. |
void | setStatementsRecovery(boolean enabled) Requests that the compiler should perform statements recovery. |
void | setUnitName(String unitName) Sets the name of the compilation unit that would hypothetically contains the source string. |
void | setWorkingCopyOwner(WorkingCopyOwner owner) Sets the working copy owner used when resolving bindings, where null means the primary owner. |