uk.co.badgersinfoil.metaas.dom
Interface ASDoWhileStatement

All Superinterfaces:
Statement, StatementContainer

public interface ASDoWhileStatement
extends Statement, StatementContainer

Obtained from StatementContainer.newDoWhile(String), represents a do { } while (condition); construct.

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());


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

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()".


setCondition

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

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


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