|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ASForEachInStatement
Obtained from StatementContainer.newForEachIn(String,String)
,
represents a for each(v in a) { }
statement.
e.g. The Java code
ASForEachInStatement forEachIn = method.newForEachIn("var v", "arr"); forEachIn.addStmt("trace(v)");
Will create ActionScript code like,
for each(var v in arr) { trace(v); }
Method Summary | |
---|---|
java.lang.String |
getIteratedString()
Returns a string representation of the expression whose value will iterated over. |
java.lang.String |
getVarString()
Returns a string representation of the loop-variable declaration for this loop. |
void |
setIterated(java.lang.String expr)
Changes the expression whose value will be iterated over by this loop. |
void |
setVar(java.lang.String expr)
Specifies the loop-variable declaration 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 getVarString()
for each(v in a) { }
, this method
will return the string "v"
.
java.lang.String getIteratedString()
for each(v in a) { }
, this method
will return the string "a"
.
void setVar(java.lang.String expr)
SyntaxException
- if the given
string is not a valid ActionScript expression.void setIterated(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 |