uk.co.badgersinfoil.metaas.dom
Interface ASWithStatement

All Superinterfaces:
ScriptElement, Statement, StatementContainer

public interface ASWithStatement
extends Statement, StatementContainer

A with-statement, such as with (expr) { }.

e.g.

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

will result in ActionScript code like,

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

See Also:
StatementContainer.newWith(Expression)

Method Summary
 Statement getBody()
           
 Expression getScope()
           
 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(Expression expr)
           
 void setScope(java.lang.String expr)
          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, 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

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.


getScope

Expression getScope()

setScope

void setScope(java.lang.String expr)
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.

setScope

void setScope(Expression expr)

getBody

Statement getBody()


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