KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > spoon > support > reflect > declaration > CtMethodImpl


1 package spoon.support.reflect.declaration;
2
3 import spoon.reflect.declaration.CtMethod;
4 import spoon.reflect.declaration.CtType;
5 import spoon.reflect.reference.CtTypeReference;
6 import spoon.reflect.visitor.CtVisitor;
7
8 /**
9  * The implementation for {@link spoon.reflect.declaration.CtMethod}.
10  *
11  * @author Renaud Pawlak
12  */

13 public class CtMethodImpl<T> extends CtExecutableImpl<T> implements CtMethod<T> {
14     private static final long serialVersionUID = 1L;
15
16     CtTypeReference<T> returnType;
17
18     public CtMethodImpl() {
19         super();
20     }
21
22     public void accept(CtVisitor v) {
23         v.visitCtMethod(this);
24     }
25
26     public CtTypeReference<T> getType() {
27         return returnType;
28     }
29
30     public void setType(CtTypeReference<T> type) {
31         this.returnType = type;
32     }
33
34     public CtType<?> getDeclaringType() {
35         return (CtType)parent;
36     }
37     
38 }
39
Popular Tags