|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Obtained from StatementContainer.newSwitch(String)
, an
ASSwitchStatement allows 'case' and 'default' statements to be added to
to the 'switch' statement.
e.g.
ASSwitchStatement switchStmt = method.newSwitch("c"); switchStmt.newCase("'a'").addStmt("aay()"); switchStmt.newCase("'b'").addStmt("bee()"); switchStmt.newDefault().addStmt("cee()");Will result in ActionScript something like,
switch(c) { case 'a': aay(); case 'b': bee(); default: cee(); }Note that to add 'break' statements, you can use
switchStmt.addStmt("break")
.
Method Summary | |
StatementContainer |
newCase(java.lang.String string)
Returns the statements to be executed in the given case for this switch statement. |
StatementContainer |
newDefault()
Returns the statements to be executed in the default case for this switch statement. |
Method Detail |
public StatementContainer newCase(java.lang.String string)
public StatementContainer newDefault()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |