|
1 |
| package edu.rice.cs.dynamicjava.symbol; |
|
2 |
| |
|
3 |
| import java.lang.reflect.Method; |
|
4 |
| import edu.rice.cs.plt.iter.IterUtil; |
|
5 |
| import edu.rice.cs.dynamicjava.symbol.type.ArrayType; |
|
6 |
| import edu.rice.cs.dynamicjava.symbol.type.Type; |
|
7 |
| import edu.rice.cs.dynamicjava.symbol.type.VariableType; |
|
8 |
| |
|
9 |
| |
|
10 |
| |
|
11 |
| |
|
12 |
| |
|
13 |
| |
|
14 |
| public class ArrayCloneMethod extends SpecialMethod { |
|
15 |
| |
|
16 |
| private final ArrayType _type; |
|
17 |
| |
|
18 |
0
| public ArrayCloneMethod(ArrayType t) {_type = t; }
|
|
19 |
| |
|
20 |
0
| public String declaredName() { return "clone"; }
|
|
21 |
0
| public DJClass declaringClass() { return null; }
|
|
22 |
| |
|
23 |
0
| public Iterable<VariableType> typeParameters() { return IterUtil.empty(); }
|
|
24 |
0
| public Iterable<LocalVariable> parameters() { return IterUtil.empty(); }
|
|
25 |
0
| public Type returnType() { return _type; }
|
|
26 |
0
| public Iterable<Type> thrownTypes() { return IterUtil.empty(); }
|
|
27 |
| |
|
28 |
0
| public boolean isStatic() { return false; }
|
|
29 |
0
| public boolean isAbstract() { return false; }
|
|
30 |
0
| public boolean isFinal() { return false; }
|
|
31 |
0
| public Access accessibility() { return Access.PUBLIC; }
|
|
32 |
0
| public Access.Module accessModule() { return new TopLevelAccessModule("java.lang"); }
|
|
33 |
| |
|
34 |
0
| protected Method implementation() throws NoSuchMethodException {
|
|
35 |
0
| return Object.class.getDeclaredMethod("clone");
|
|
36 |
| } |
|
37 |
| |
|
38 |
| } |