uk.co.badgersinfoil.metaas.dom
Interface ASWithStatement

All Superinterfaces:
Statement, StatementContainer

public interface ASWithStatement
extends Statement, StatementContainer

An ActionScript with (expr) { } construct.

Instances can be created with StatementContainer.newWith(String):

ASWithStatement stmt = method.newWith("myObject");
stmt.newExprStmt("trace(property)");

which will result in ActionScript code like,

with (myObject)) {
        trace(property);
}


Method Summary
 java.lang.String getScopeString()
          Returns a string representation of the expression who's value will be used as new scope for the execution of the statements in the body of this with-statement.
 void setScope(java.lang.String string)
          Changes the expression who's value will be used as new scope for the execution of the statements in the body of this with-statement.
 
Methods inherited from interface uk.co.badgersinfoil.metaas.dom.StatementContainer
addComment, addStmt, containsCode, getStatementList, newDeclaration, newDoWhile, newExprStmt, newFor, newForEachIn, newForIn, newIf, newReturn, newSwitch, newWhile, newWith
 

Method Detail

getScopeString

java.lang.String getScopeString()
Returns a string representation of the expression who's value will be used as new scope for the execution of the statements in the body of this with-statement.


setScope

void setScope(java.lang.String string)
Changes the expression who's value will be used as new scope for the execution of the statements in the body of this with-statement.

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


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