KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > spoon > support > reflect > code > CtExpressionImpl


1 package spoon.support.reflect.code;
2
3 import java.util.ArrayList JavaDoc;
4 import java.util.List JavaDoc;
5
6 import spoon.reflect.code.CtCodeElement;
7 import spoon.reflect.code.CtExpression;
8 import spoon.reflect.declaration.CtSimpleType;
9 import spoon.reflect.reference.CtTypeReference;
10
11 public abstract class CtExpressionImpl<T> extends CtCodeElementImpl implements
12         CtExpression<T> {
13     CtTypeReference<T> type;
14
15     List JavaDoc<CtTypeReference<?>> typeCasts=new ArrayList JavaDoc<CtTypeReference<?>>();
16
17     public CtCodeElement getSubstitution(CtSimpleType targetType) {
18         return getFactory().Core().clone(this);
19     }
20
21     public CtTypeReference<T> getType() {
22         return type;
23     }
24     
25     public List JavaDoc<CtTypeReference<?>> getTypeCasts() {
26         return typeCasts;
27     }
28     
29     public T S() {
30         return null;
31     }
32     
33     public void setType(CtTypeReference<T> type) {
34         this.type=type;
35     }
36     
37     public void setTypeCasts(List JavaDoc<CtTypeReference<?>> casts) {
38         this.typeCasts = casts;
39     }
40 }
41
Popular Tags