本文整理汇总了Java中jdk.nashorn.internal.ir.ForNode.setIterator方法的典型用法代码示例。如果您正苦于以下问题:Java ForNode.setIterator方法的具体用法?Java ForNode.setIterator怎么用?Java ForNode.setIterator使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jdk.nashorn.internal.ir.ForNode
的用法示例。
在下文中一共展示了ForNode.setIterator方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: leaveForNode
import jdk.nashorn.internal.ir.ForNode; //导入方法依赖的package包/类
@Override
public Node leaveForNode(final ForNode forNode) {
if (forNode.isForIn()) {
forNode.setIterator(newInternal(lc.getCurrentFunction().uniqueName(ITERATOR_PREFIX.symbolName()), Type.typeFor(ITERATOR_PREFIX.type()))); //NASHORN-73
/*
* Iterators return objects, so we need to widen the scope of the
* init variable if it, for example, has been assigned double type
* see NASHORN-50
*/
newType(forNode.getInit().getSymbol(), Type.OBJECT);
}
end(forNode);
return forNode;
}
示例2: leaveForNode
import jdk.nashorn.internal.ir.ForNode; //导入方法依赖的package包/类
@Override
public Node leaveForNode(final ForNode forNode) {
if (forNode.isForIn()) {
forNode.setIterator(newObjectInternal(ITERATOR_PREFIX)); //NASHORN-73
}
return end(forNode);
}
示例3: leaveForNode
import jdk.nashorn.internal.ir.ForNode; //导入方法依赖的package包/类
@Override
public Node leaveForNode(final ForNode forNode) {
if (forNode.isForInOrOf()) {
return forNode.setIterator(lc, newObjectInternal(ITERATOR_PREFIX)); //NASHORN-73
}
return end(forNode);
}
示例4: leaveForNode
import jdk.nashorn.internal.ir.ForNode; //导入方法依赖的package包/类
@Override
public Node leaveForNode(final ForNode forNode) {
if (forNode.isForIn()) {
return forNode.setIterator(lc, newObjectInternal(ITERATOR_PREFIX)); //NASHORN-73
}
return end(forNode);
}
示例5: leaveForNode
import jdk.nashorn.internal.ir.ForNode; //导入方法依赖的package包/类
@Override
public Node leaveForNode(final ForNode forNode) {
if (forNode.isForIn()) {
return forNode.setIterator(lc, newObjectInternal(ITERATOR_PREFIX)); //NASHORN-73
}
return forNode;
}