public interface FieldDeclarationHandler
TypeAnalyzer
.
Users may register field handlers (and other kinds of supported
handlers) to the TypeAnalyzer
used to analyze Java source code.
When the analyzer detects a field declaration, it calls back those
field handlers before and after proper types are assigned to all the
arguments.
exit(FieldDeclaration, TypeAnalyzerState)
of field handlers are
allowed to modify the field declaration, either by modifying its children
in the AST, or by replacing the whole field declaration with another valid
AST node. This is because the handler is called after the subtree rooted at
the field declaration is completely visited by the analyzer. However,
modifying any node out of this subtree (e.g., changing the parent of this
field declaration to another one) may cause unexpected effect.
enter(FieldDeclaration, TypeAnalyzerState)
should not modify the
field declaration.
Modifier and Type | Method and Description |
---|---|
void |
enter(org.eclipse.jdt.core.dom.FieldDeclaration node,
TypeAnalyzerState state)
Enter a field declaration.
|
void |
exit(org.eclipse.jdt.core.dom.FieldDeclaration node,
TypeAnalyzerState state)
Exit a field declaration.
|
void enter(org.eclipse.jdt.core.dom.FieldDeclaration node, TypeAnalyzerState state)
node
- The field declaration node.state
- The current state of the type analyzer.void exit(org.eclipse.jdt.core.dom.FieldDeclaration node, TypeAnalyzerState state)
node
- The field declaration node.state
- The current state of the type analyzer.