|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ASForStatement
Obtained from StatementContainer.newFor(String,String,String)
,
represents a for (; ; ) { }
statement.
e.g. The Java code
ASForStatement forStmt = method.newFor("var i=0", "i<10", "i++"); forStmt.addStmt("trace(i)");
Will create ActionScript code like,
for (var i=0; i<10; i++) { trace(i); }
Method Summary | |
---|---|
java.lang.String |
getConditionString()
Returns a string representation of the loop termination condition expression. |
java.lang.String |
getInitString()
Returns a string representation of the loop initialisation expression. |
java.lang.String |
getUpdateString()
Returns a string representation of the loop update expression. |
void |
setCondition(java.lang.String expr)
Changes the termination condition expression for this loop. |
void |
setInit(java.lang.String expr)
Changes the initialisation expression for this loop. |
void |
setUpdate(java.lang.String expr)
Changes the update expression for this 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 |
---|
java.lang.String getInitString()
for (var i=0; i<10; i++)
, this
method will return the string "var i=0"
.
java.lang.String getConditionString()
for (var i=0; i<10; i++)
, this
method will return the string "i<10"
.
java.lang.String getUpdateString()
for (var i=0; i<10; i++)
, this
method will return the string "i++"
.
void setInit(java.lang.String expr)
SyntaxException
- if the given
string is not a valid ActionScript expression.void setCondition(java.lang.String expr)
SyntaxException
- if the given
string is not a valid ActionScript expression.void setUpdate(java.lang.String expr)
SyntaxException
- if the given
string is not a valid ActionScript expression.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |