1 package spoon.support.reflect.code; 2 3 import java.util.ArrayList ; 4 import java.util.List ; 5 6 import spoon.reflect.code.CtCase; 7 import spoon.reflect.code.CtExpression; 8 import spoon.reflect.code.CtSwitch; 9 import spoon.reflect.visitor.CtVisitor; 10 11 public class CtSwitchImpl<S> extends CtStatementImpl implements CtSwitch<S> { 12 private static final long serialVersionUID = 1L; 13 List <CtCase<? super S>> cases = new ArrayList <CtCase<? super S>>(); 14 15 CtExpression<S> expression; 16 17 public void accept(CtVisitor visitor) { 18 visitor.visitCtSwitch(this); 19 } 20 21 public List <CtCase<? super S>> getCases() { 22 return cases; 23 } 24 25 public CtExpression<S> getSelector() { 26 return expression; 27 } 28 29 public void setCases(List <CtCase<? super S>> cases) { 30 this.cases = cases; 31 } 32 33 public void setSelector(CtExpression<S> selector) { 34 this.expression = selector; 35 } 36 37 } 38 | Popular Tags |