|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
Represents a switch statement. For example:
switch (kind) {
case ATTR:
case NODE:
default:
}
A switch statement's body is a a collection of switch groups. A switch group is a (possibly empty) set of statements with the associated case labels.
| Method Summary | |
AstSwitchGroup[] |
getBody()
Returns the body of this switch statement. |
AstCaseLabel |
getCaseLabel(int i)
Returns the case label with the specified number. |
AstExpression |
getCondition()
Returns the selection expression of this switch statement. |
AstSwitchGroup |
getDefaultGroup()
Returns a switch group that has the the default label, returns null
if this switch statement has no default label. |
| Methods inherited from interface com.togethersoft.sca.ast.AstStatement |
getLabelNames |
| Methods inherited from interface com.togethersoft.sca.ast.AstObject |
addComment, getChildren, getComments, getCompilationUnit, getDeclaringMethod, getDeclaringType, getObjectKind, getPackage, getParent, getPosition, isDeleted, remove, replaceWith, replaceWith, setPosition, setPositionAfter, visitExpressions, visitStatements |
| Method Detail |
public AstSwitchGroup[] getBody()
public AstCaseLabel getCaseLabel(int i)
Returns null if case label with the specified number
does not exist.
i - the number of the case label.public AstExpression getCondition()
public AstSwitchGroup getDefaultGroup()
null
if this switch statement has no default label.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||