com.borland.jbuilder.jot
Interface JotSwitch
- All Superinterfaces:
- JotMarker, JotSourceElement, JotStatement
- public interface JotSwitch
- extends JotStatement
This interface represents a Java switch
statement. See section 14.9
in the Java Language Specification for more information.
Method Summary |
JotCase[] |
getCases()
Returns an array containing JotCase instances that represent the case
labels contained in the switch statement. |
JotCodeBlock |
getCodeBlock()
Returns the body of this switch statement. |
JotDefault |
getDefault()
Returns the a JotDefault instance representing the default label. |
JotExpression |
getExpression()
Returns the expression to be evaluated before transferring control to
statement immediately following the matching case label. |
getExpression
public JotExpression getExpression()
- Returns the expression to be evaluated before transferring control to
statement immediately following the matching
case
label.
getCases
public JotCase[] getCases()
- Returns an array containing JotCase instances that represent the
case
labels contained in the switch
statement. The returned array will
not contain the JotDefault instance if one exists. If there are no
case
labels in the switch
, then returns a zero-length array.
getDefault
public JotDefault getDefault()
- Returns the a JotDefault instance representing the
default
label.
May return null
if there is no default
label.
getCodeBlock
public JotCodeBlock getCodeBlock()
- Returns the body of this
switch
statement. The body contains all
of the case
and default
labels.
- Specified by:
getCodeBlock
in interface JotStatement