uk.co.badgersinfoil.metaas.dom
Interface ASDoWhileStatement

All Superinterfaces:
ScriptElement, Statement, StatementContainer

public interface ASDoWhileStatement
extends Statement, StatementContainer

A do-while loop, such as do { } while (condition);.

e.g. The following Java code,

ASDoWhileStatement doWhile = method.newDoWhile("test()");
doWhile.addStmt("trace('still testing')");

Will result in AS which looks like this,

do {
        trace('still testing');
} while (test());

See Also:
StatementContainer.newDoWhile(String)

Method Summary
 Expression getCondition()
           
 java.lang.String getConditionString()
          Returns a string representation of the loop termination condition expression.
 void setCondition(Expression expr)
           
 void setCondition(java.lang.String expr)
          Sets the loop termination condition for this do-while loop.
 
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

getConditionString

java.lang.String getConditionString()
Returns a string representation of the loop termination condition expression.

e.g. given the loop,

do { nothing(); } while (test());

This method would return "test()".


getCondition

Expression getCondition()

setCondition

void setCondition(java.lang.String expr)
Sets the loop termination condition for this do-while loop.

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

setCondition

void setCondition(Expression expr)


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