|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ASSwitchStatement
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 | |
---|---|
ASSwitchCase |
newCase(java.lang.String string)
Creates a case -label in this switch-statement with the given value,
to which other statements can be added. |
ASSwitchDefault |
newDefault()
Creates a default -label in this switch-statement, to
which other statements can be added. |
Method Detail |
---|
ASSwitchCase newCase(java.lang.String string)
case
-label in this switch-statement with the given value,
to which other statements can be added.
ASSwitchDefault newDefault()
default
-label in this switch-statement, to
which other statements can be added.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |