uk.co.badgersinfoil.metaas.dom
Interface ASSwitchStatement

All Superinterfaces:
Statement

public interface ASSwitchStatement
extends Statement

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

newCase

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.


newDefault

ASSwitchDefault newDefault()
Creates a default-label in this switch-statement, to which other statements can be added.



Copyright © 2006-2007 David Holroyd. All Rights Reserved.