Package org.extendj.neobeaver.ast
Class List<T extends ASTNode>
- java.lang.Object
-
- org.extendj.neobeaver.ast.ASTNode<T>
-
- org.extendj.neobeaver.ast.List<T>
-
- All Implemented Interfaces:
java.lang.Cloneable,java.lang.Iterable<T>,Parser.Symbol
public class List<T extends ASTNode> extends ASTNode<T> implements java.lang.Cloneable, java.lang.Iterable<T>
-
-
Field Summary
-
Fields inherited from class org.extendj.neobeaver.ast.ASTNode
children, generatedWithCacheCycle, numChildren, parent
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description List<T>add(T node)List<T>addAll(java.lang.Iterable<? extends T> c)voidaddChild(T node)List<T>clone()List<T>copy()voidflushAttrCache()voidflushCollectionCache()List<T>fullCopy()Deprecated.Please use treeCopy or treeCopyNoTransform insteadintgetNumChild()voidinit$Children()Initializes the child array to the correct size.voidinsertChild(ASTNode node, int i)protected booleanis$Equal(ASTNode node)java.util.Iterator<T>iterator()voidremoveChild(int i)List<T>treeCopy()Create a deep copy of the AST subtree at this node.List<T>treeCopyNoTransform()Create a deep copy of the AST subtree at this node.-
Methods inherited from class org.extendj.neobeaver.ast.ASTNode
accept, astChildIterator, astChildren, doFullTraversal, flushAttrAndCollectionCache, flushCache, flushTreeCache, getChild, getChildNoTransform, getIndexOfChild, getNumChildNoTransform, getParent, getPosition, is$Equal, numChildren, resetState, rewrittenNode, setChild, setParent, setPosition, state
-
-
-
-
Constructor Detail
-
List
public List()
-
List
public List(T... initialChildren)
-
-
Method Detail
-
init$Children
public void init$Children()
Initializes the child array to the correct size. Initializes List and Opt nta children.- Overrides:
init$Childrenin classASTNode<T extends ASTNode>
-
insertChild
public void insertChild(ASTNode node, int i)
- Overrides:
insertChildin classASTNode<T extends ASTNode>
-
removeChild
public void removeChild(int i)
- Overrides:
removeChildin classASTNode<T extends ASTNode>
-
getNumChild
public int getNumChild()
- Overrides:
getNumChildin classASTNode<T extends ASTNode>
-
iterator
public java.util.Iterator<T> iterator()
-
flushAttrCache
public void flushAttrCache()
- Overrides:
flushAttrCachein classASTNode<T extends ASTNode>
-
flushCollectionCache
public void flushCollectionCache()
- Overrides:
flushCollectionCachein classASTNode<T extends ASTNode>
-
fullCopy
@Deprecated public List<T> fullCopy()
Deprecated.Please use treeCopy or treeCopyNoTransform insteadCreate a deep copy of the AST subtree at this node. The copy is dangling, i.e. has no parent.
-
treeCopyNoTransform
public List<T> treeCopyNoTransform()
Create a deep copy of the AST subtree at this node. The copy is dangling, i.e. has no parent.- Overrides:
treeCopyNoTransformin classASTNode<T extends ASTNode>- Returns:
- dangling copy of the subtree at this node
-
treeCopy
public List<T> treeCopy()
Create a deep copy of the AST subtree at this node. The subtree of this node is traversed to trigger rewrites before copy. The copy is dangling, i.e. has no parent.
-
-