forked from tushartushar/DesigniteJava
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMethodInvVisitor.java
More file actions
37 lines (28 loc) · 939 Bytes
/
MethodInvVisitor.java
File metadata and controls
37 lines (28 loc) · 939 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package Designite.SourceModel;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.jdt.core.dom.ASTVisitor;
import org.eclipse.jdt.core.dom.MethodDeclaration;
import org.eclipse.jdt.core.dom.MethodInvocation;
import org.eclipse.jdt.core.dom.SuperMethodInvocation;
public class MethodInvVisitor extends ASTVisitor {
List<MethodInvocation> calledMethods = new ArrayList<MethodInvocation>();
//private MethodDeclaration methodDeclaration;
public MethodInvVisitor(MethodDeclaration methodDeclaration) {
//this.methodDeclaration = methodDeclaration;
}
public MethodInvVisitor() {
}
@Override
public boolean visit(MethodInvocation method) {
calledMethods.add(method);
method.resolveMethodBinding();
return super.visit(method);
}
public boolean visit(SuperMethodInvocation method) {
return super.visit(method);
}
public List<MethodInvocation> getCalledMethods() {
return calledMethods;
}
}