polyglot.ast
Class NodeList_c
java.lang.Object
polyglot.ast.Node_c
polyglot.ast.NodeList_c
- All Implemented Interfaces:
- java.lang.Cloneable, JL, Node, NodeList, NodeOps, Copy
public class NodeList_c
- extends Node_c
- implements NodeList
A NodeList
represents a list of AST nodes.
NodeList
s are not intended to appear as part of the AST. When
a node is visited, it may replace itself with multiple nodes by returning a
NodeList
to the visitor. The rewritten node's parent would
then be responsible for properly splicing those nodes into the AST.
Method Summary |
NodeFactory |
nodeFactory()
Get the NodeFactory to use when converting the list to a
proper AST node. |
java.util.List |
nodes()
Get the nodes contained in the list. |
NodeList |
nodes(java.util.List nodes)
Set the nodes contained in the list. |
Block |
toBlock()
Convert the list into a Block . |
Methods inherited from class polyglot.ast.Node_c |
addDecls, buildTypes, buildTypesEnter, checkConstants, childExpectedType, copy, copy, copy, del, del, disambiguate, disambiguateEnter, disambiguateOverride, dump, dump, dump, enterChildScope, enterScope, error, error, exceptionCheck, exceptionCheckEnter, ext, ext, ext, ext, init, isDisambiguated, isTypeChecked, node, position, position, prettyPrint, prettyPrint, prettyPrint, print, printBlock, printSubStmt, throwTypes, toString, translate, typeCheck, typeCheckEnter, typeCheckOverride, visit, visitChild, visitChildren, visitEdge, visitList |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface polyglot.ast.Node |
childExpectedType, del, del, dump, error, error, ext, ext, ext, ext, isDisambiguated, isTypeChecked, position, position, visit, visitChild, visitEdge, visitList |
Methods inherited from interface polyglot.ast.JL |
init, node |
Methods inherited from interface polyglot.ast.NodeOps |
addDecls, buildTypes, buildTypesEnter, checkConstants, copy, copy, disambiguate, disambiguateEnter, disambiguateOverride, dump, dump, enterChildScope, enterScope, exceptionCheck, exceptionCheckEnter, prettyPrint, prettyPrint, prettyPrint, throwTypes, translate, typeCheck, typeCheckEnter, typeCheckOverride, visitChildren |
Methods inherited from interface polyglot.util.Copy |
copy |
nf
protected NodeFactory nf
nodes
protected java.util.List nodes
NodeList_c
public NodeList_c(Position pos,
NodeFactory nf,
java.util.List nodes)
nodes
public java.util.List nodes()
- Description copied from interface:
NodeList
- Get the nodes contained in the list.
- Specified by:
nodes
in interface NodeList
nodes
public NodeList nodes(java.util.List nodes)
- Description copied from interface:
NodeList
- Set the nodes contained in the list.
- Specified by:
nodes
in interface NodeList
nodeFactory
public NodeFactory nodeFactory()
- Description copied from interface:
NodeList
- Get the
NodeFactory
to use when converting the list to a
proper AST node.
- Specified by:
nodeFactory
in interface NodeList
toBlock
public Block toBlock()
- Description copied from interface:
NodeList
- Convert the list into a
Block
.
- Specified by:
toBlock
in interface NodeList