public abstract class ASTRequestor extends Object
ASTRequestor.acceptAST is called for each of the
compilation units passed to
After all the compilation units have been processed,
ASTRequestor.acceptBindings is called for each
of the binding keys passed to
This class is intended to be subclassed by clients. AST requestors are serially reusable, but neither reentrant nor thread-safe.
|Modifier||Constructor and Description|
Creates a new instance.
|Modifier and Type||Method and Description|
Accepts an AST corresponding to the compilation unit.
Accepts a binding corresponding to the binding key.
Resolves bindings for the given binding keys.
public void acceptAST(ICompilationUnit source, CompilationUnit ast)
astis an AST for
The default implementation of this method does nothing. Clients should override to process the resulting AST.
source- the compilation unit the ast is coming from
ast- the requested abtract syntax tree
bindingis the binding for
nullif 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 binding
binding- the requested binding, or
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
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
acceptAST callbacks, or for top-level types and their
members even within
bindingKeys- the binding keys to look up
nullentries for keys that could not be resolved
Copyright (c) 2000, 2016 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.