|
10 | 10 | public class GhostFunction { |
11 | 11 |
|
12 | 12 | private final String name; |
13 | | - private final List<CtTypeReference<?>> param_types; |
14 | | - private final CtTypeReference<?> return_type; |
| 13 | + private final List<CtTypeReference<?>> paramTypes; |
| 14 | + private final CtTypeReference<?> returnType; |
15 | 15 | private final String prefix; |
16 | 16 |
|
17 | 17 | public GhostFunction(GhostDTO f, Factory factory, String prefix) { |
18 | 18 | String klass = this.getParentClassName(prefix); |
19 | 19 | this.name = f.name(); |
20 | | - this.return_type = Utils.getType(f.return_type().equals(klass) ? prefix : f.return_type(), factory); |
21 | | - this.param_types = new ArrayList<>(); |
| 20 | + this.returnType = Utils.getType(f.returnType().equals(klass) ? prefix : f.returnType(), factory); |
| 21 | + this.paramTypes = new ArrayList<>(); |
22 | 22 | this.prefix = prefix; |
23 | | - for (String t : f.param_types()) { |
24 | | - this.param_types.add(Utils.getType(t.equals(klass) ? prefix : t, factory)); |
| 23 | + for (String t : f.paramTypes()) { |
| 24 | + this.paramTypes.add(Utils.getType(t.equals(klass) ? prefix : t, factory)); |
25 | 25 | } |
26 | 26 | } |
27 | 27 |
|
28 | | - public GhostFunction(String name, List<String> param_types, CtTypeReference<?> return_type, Factory factory, |
| 28 | + public GhostFunction(String name, List<String> paramTypes, CtTypeReference<?> returnType, Factory factory, |
29 | 29 | String prefix) { |
30 | 30 | String klass = this.getParentClassName(prefix); |
31 | | - String type = return_type.toString().equals(klass) ? prefix : return_type.toString(); |
| 31 | + String type = returnType.toString().equals(klass) ? prefix : returnType.toString(); |
32 | 32 | this.name = name; |
33 | | - this.return_type = Utils.getType(type, factory); |
34 | | - this.param_types = new ArrayList<>(); |
| 33 | + this.returnType = Utils.getType(type, factory); |
| 34 | + this.paramTypes = new ArrayList<>(); |
35 | 35 | this.prefix = prefix; |
36 | | - for (String mType : param_types) { |
37 | | - this.param_types.add(Utils.getType(mType.equals(klass) ? prefix : mType, factory)); |
| 36 | + for (String mType : paramTypes) { |
| 37 | + this.paramTypes.add(Utils.getType(mType.equals(klass) ? prefix : mType, factory)); |
38 | 38 | } |
39 | 39 | } |
40 | 40 |
|
41 | | - protected GhostFunction(String name, List<CtTypeReference<?>> list, CtTypeReference<?> return_type, String prefix) { |
| 41 | + protected GhostFunction(String name, List<CtTypeReference<?>> list, CtTypeReference<?> returnType, String prefix) { |
42 | 42 | this.name = name; |
43 | | - this.return_type = return_type; |
44 | | - this.param_types = list; |
| 43 | + this.returnType = returnType; |
| 44 | + this.paramTypes = list; |
45 | 45 | this.prefix = prefix; |
46 | 46 | } |
47 | 47 |
|
48 | 48 | public CtTypeReference<?> getReturnType() { |
49 | | - return return_type; |
| 49 | + return returnType; |
50 | 50 | } |
51 | 51 |
|
52 | 52 | public List<CtTypeReference<?>> getParametersTypes() { |
53 | | - return param_types; |
| 53 | + return paramTypes; |
54 | 54 | } |
55 | 55 |
|
56 | 56 | public String toString() { |
57 | 57 | StringBuilder sb = new StringBuilder(); |
58 | | - sb.append("ghost ").append(return_type.toString()).append(" ").append(name).append("("); |
59 | | - for (CtTypeReference<?> t : param_types) { |
| 58 | + sb.append("ghost ").append(returnType.toString()).append(" ").append(name).append("("); |
| 59 | + for (CtTypeReference<?> t : paramTypes) { |
60 | 60 | sb.append(t.toString()).append(" ,"); |
61 | 61 | } |
62 | 62 | sb.delete(sb.length() - 2, sb.length()); |
|
0 commit comments