|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ASForEachInStatement
A for-each-in statement, such as for each(v in a) { }
.
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); }
StatementContainer.newForEachIn(Expression, Expression)
Method Summary | |
---|---|
Expression |
getIterated()
|
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(Expression expr)
|
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, 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 |
---|
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"
.
Expression getIterated()
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.void setIterated(Expression expr)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |