uk.co.badgersinfoil.metaas.dom
Interface ASSwitchCase

All Superinterfaces:
ScriptElement, StatementContainer, SwitchLabel

public interface ASSwitchCase
extends SwitchLabel

A switch-statement case-label, and the list of statements immediately following it.

For example, given the following code...

switch (c) {
    case 1:
        trace("one");
        break;
    default:
        trace("many");
}

...an ASSwitchCase would be available with label-value of 1 which will provide the trace("one"); and break; statements when its StatementContainer.getStatementList() method is called.

See Also:
ASSwitchStatement.newCase(String), ASSwitchStatement

Method Summary
 Expression getLabelValue()
          Returns a the value expression for this label.
 java.lang.String getLabelValueString()
          Returns a string representation of the value expression for this label.
 void setLabelValue(java.lang.String constant)
          Changes the value expression for this case label.
 
Methods inherited from interface uk.co.badgersinfoil.metaas.dom.StatementContainer
addComment, addStmt, containsCode, getStatementList, newBreak, newContinue, newDeclaration, newDeclaration, newDefaultXMLNamespace, newDoWhile, newDoWhile, newExprStmt, newExprStmt, newFor, newFor, newForEachIn, newForEachIn, newForIn, newForIn, newIf, newIf, newReturn, newReturn, newReturn, newSuper, newSwitch, newSwitch, newThrow, newTryCatch, newTryFinally, newWhile, newWhile, newWith, newWith
 

Method Detail

getLabelValue

Expression getLabelValue()
Returns a the value expression for this label.


getLabelValueString

java.lang.String getLabelValueString()
Returns a string representation of the value expression for this label. e.g. given the label case 42:, this method would return the string "42".


setLabelValue

void setLabelValue(java.lang.String constant)
Changes the value expression for this case label.

Throws:
SyntaxException - if the given string is not a valid ActionScript expression.


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