1 package spoon.support.reflect.code;2 3 import java.util.ArrayList ;4 import java.util.List ;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 implements12 CtExpression<T> {13 CtTypeReference<T> type;14 15 List <CtTypeReference<?>> typeCasts=new ArrayList <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 <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 <CtTypeReference<?>> casts) {38 this.typeCasts = casts;39 }40 }41