- 
- All Superinterfaces:
 ExpressionTree,Tree
public interface YieldTree extends ExpressionTree
A tree node for yield expressions used in generator functions. For example:function* id(){ var index = 0; while(index < 10) yield index++; }- Since:
 - 9
 
 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ExpressionTreegetExpression()Returns the expression that is yielded.booleanisStar()Is this a yield * expression in a generator function?- 
Methods declared in interface jdk.nashorn.api.tree.Tree
accept, getEndPosition, getKind, getStartPosition 
 - 
 
 - 
 
- 
- 
Method Detail
- 
getExpression
ExpressionTree getExpression()
Returns the expression that is yielded.- Returns:
 - The expression that is yielded.
 
 
- 
isStar
boolean isStar()
Is this a yield * expression in a generator function? For example:function* id(){ yield 1; yield * anotherGeneratorFunc(); yield 10; }- Returns:
 - true if this is a yield * expression
 
 
 - 
 
 -