KickJava   Java API By Example, From Geeks To Geeks.

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


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.CtAssignment;
7 import spoon.reflect.code.CtCodeElement;
8 import spoon.reflect.code.CtExpression;
9 import spoon.reflect.declaration.CtSimpleType;
10 import spoon.reflect.reference.CtTypeReference;
11 import spoon.reflect.visitor.CtVisitor;
12
13 public class CtAssignmentImpl<T, A extends T> extends CtStatementImpl implements
14         CtAssignment<T, A> {
15     private static final long serialVersionUID = 1L;
16     CtExpression<T> assigned;
17
18     CtExpression<A> assignment;
19
20     CtTypeReference<T> type;
21
22     List JavaDoc<CtTypeReference<?>> typeCasts = new ArrayList JavaDoc<CtTypeReference<?>>();
23
24     public void accept(CtVisitor visitor) {
25         visitor.visitCtAssignment(this);
26     }
27
28     public CtExpression<T> getAssigned() {
29         return assigned;
30     }
31
32     public CtExpression<A> getAssignment() {
33         return assignment;
34     }
35
36     public CtCodeElement getSubstitution(CtSimpleType targetType) {
37         return getFactory().Core().clone(this);
38     }
39
40     public CtTypeReference<T> getType() {
41         return type;
42     }
43
44     public List JavaDoc<CtTypeReference<?>> getTypeCasts() {
45         return typeCasts;
46     }
47
48     public T S() {
49         return null;
50     }
51
52     public void setAssigned(CtExpression<T> assigned) {
53         this.assigned = assigned;
54     }
55
56     public void setAssignment(CtExpression<A> assignment) {
57         this.assignment = assignment;
58     }
59
60     public void setType(CtTypeReference<T> type) {
61         this.type = type;
62     }
63
64     public void setTypeCasts(List JavaDoc<CtTypeReference<?>> casts) {
65         this.typeCasts = casts;
66     }
67
68 }
69
Popular Tags