|
Eclipse JDT Release 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.jdt.core.dom.FileASTRequestor
public abstract class FileASTRequestor
An AST requestor handles ASTs for compilation units passed to
ASTParser.createASTs.
FileASTRequestor.acceptAST is called for each of the
compilation units passed to ASTParser.createASTs.
After all the compilation units have been processed,
FileASTRequestor.acceptBinding is called for each
of the binding keys passed to ASTParser.createASTs.
This class is intended to be subclassed by clients. AST requestors are serially reusable, but neither reentrant nor thread-safe.
ASTParser.createASTs(String[], String[], String[], FileASTRequestor, org.eclipse.core.runtime.IProgressMonitor)| Constructor Summary | |
|---|---|
FileASTRequestor()
|
|
| Method Summary | |
|---|---|
void |
acceptAST(String sourceFilePath,
CompilationUnit ast)
Accepts an AST corresponding to the compilation unit. |
void |
acceptBinding(String bindingKey,
IBinding binding)
Accepts a binding corresponding to the binding key. |
IBinding[] |
createBindings(String[] bindingKeys)
Resolves bindings for the given binding keys. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileASTRequestor()
| Method Detail |
|---|
public void acceptAST(String sourceFilePath,
CompilationUnit ast)
ast is an AST for source.
The default implementation of this method does nothing. Clients should override to process the resulting AST.
sourceFilePath - the compilation unit the given ast is coming fromast - the requested abstract syntax tree
public void acceptBinding(String bindingKey,
IBinding binding)
binding is the binding for
bindingKey; binding is null
if the key cannot be resolved.
The default implementation of this method does nothing. Clients should override to process the resulting binding.
bindingKey - the key of the requested bindingbinding - the requested binding, or null if nonepublic final IBinding[] createBindings(String[] bindingKeys)
IBinding.getKey().
If a binding key cannot be resolved, null is put in the resulting array.
Bindings can only be resolved in the dynamic scope of a ASTParser.createASTs,
and only if ASTParser.resolveBindings(true) was specified.
Caveat: During an acceptAST callback, there are implementation
limitations concerning the look up of binding keys representing local elements.
In some cases, the binding is unavailable, and null will be returned.
This is only an issue during an acceptAST callback, and only
when the binding key represents a local element (e.g., local variable,
local class, method declared in anonymous class). There is no such limitation
outside of acceptAST callbacks, or for top-level types and their
members even within acceptAST callbacks.
bindingKeys - the binding keys to look up
bindingKeys parameter,
with null entries for keys that could not be resolved
|
Eclipse JDT Release 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) 2000, 2011 IBM Corporation and others. All rights reserved.