Interface CtSwitch<S>

Type Parameters:
S - the type of the selector expression (it would be better to be able to define an upper bound, but it is not possible because of Java's type hierarchy, especially since the enums that make things even worse!)
All Superinterfaces:
Cloneable, CtAbstractSwitch<S>, CtCodeElement, CtElement, CtQueryable, CtStatement, CtVisitable, FactoryAccessor, Serializable, SourcePositionHolder
All Known Implementing Classes:
CtSwitchImpl

public interface CtSwitch<S> extends CtStatement, CtAbstractSwitch<S>
This code element defines a switch statement. Example:
 int x = 0;
 switch(x) { // <-- switch statement
     case 1:
       System.out.println("foo");
 }
  • Method Details