forked from sdgdsffdsfff/JavaMethodCallGraph
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClassVisitorTest.java
More file actions
47 lines (42 loc) · 1.45 KB
/
ClassVisitorTest.java
File metadata and controls
47 lines (42 loc) · 1.45 KB
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
38
39
40
41
42
43
44
45
46
47
/**
* Created by zhangyue on 2020/11/11 4:04 下午
*/
public class ClassVisitorTest {
public static void main(String[] args) {
// String path="ssm2";
// String path1="/Users/zhangyue/Downloads/ssm2/src/main/java/com/ncu/dao/OrdersMapper.java";
// File file=new File(path1);
// ClassVisitor visitor=new ClassVisitor(path,path1);
// CompilationUnit cu;
//
// {
// try {
// cu = StaticJavaParser.parse(file);
// visitor.visit(cu,null);
// } catch (FileNotFoundException e) {
// e.printStackTrace();
// }
// }
//
// for (Map.Entry entry:visitor.getMethodAndType().entrySet()){
// System.out.println("类型参数: "+entry.getKey()+" "+entry.getValue());
// }
// for (Map.Entry entry:visitor.getMethodAndParameter().entrySet()){
// System.out.println("方法: "+entry.getKey()+" "+entry.getValue());
// for (Parameter ss:(List<Parameter>)entry.getValue()){
// System.out.println(ss.getType().asString());
// }
//
// }
// List<String> stringList=new ArrayList<>();
// Map<String,String> stringList=new HashMap<>();
// if (stringList==null){
// System.out.println("sssss");
// }else {
// System.out.println("wwwww");
// }
double i=1;
int j=2;
System.out.println(i/j);
}
}