| core.FieldDeclarationVisitor
FieldDeclarationVisitor | public class FieldDeclarationVisitor extends ASTVisitor (Code) | | author: sh |
Method Summary | |
public void | process(CompilationUnit unit, RefactorInfo info) Starts the process.
Parameters: unit - the AST root node. | public boolean | visit(FieldDeclaration node) Looks for field declarations.
For every occurence matching the renamed field
the field type would be updated
e.g. | public boolean | visit(MethodDeclaration node) Looks for method declarations.
For each method declarations at first the return statement
in the method body is searched. | public boolean | visit(FieldAccess node) Looks for field acess. |
process | public void process(CompilationUnit unit, RefactorInfo info)(Code) | | Starts the process.
Parameters: unit - the AST root node. Bindings have to been resolved. |
visit | public boolean visit(FieldDeclaration node)(Code) | | Looks for field declarations.
For every occurence matching the renamed field
the field type would be updated
e.g. private int a; --> private String a;
If the use set a new variable name the new name
will be set.
Parameters: node - the node to visit |
visit | public boolean visit(MethodDeclaration node)(Code) | | Looks for method declarations.
For each method declarations at first the return statement
in the method body is searched. For an occurency it checks
if the return value is the same type as the field declarations.
If so, the methods return value, method name and method
parameter types will be adapted.
Parameters: node - the node to visit |
visit | public boolean visit(FieldAccess node)(Code) | | Looks for field acess.
For every occurence matching the renamed field
the field statement would be updated.
Parameters: node - the node to visit |
|
|