public interface AstNode<T extends AstNode<T>> extends AstNodeAttributeInterface, AstNodePropertyInterface, xtc.tree.Locatable, Cloneable, Serializable, List<T>
| Modifier and Type | Field and Description |
|---|---|
static String[] |
EMPTY_CHILD_NAMES |
static int |
NT_CUSTOM_BIT |
static int |
NT_NODE_LIST |
static int |
NT_PARSER_ENTITY |
static int |
NT_TEXT |
static int |
NT_TUPLE_1 |
static int |
NT_TUPLE_2 |
static int |
NT_TUPLE_3 |
static int |
NT_TUPLE_4 |
static int |
NT_TUPLE_5 |
static int |
NT_UNTYPED |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addAll(xtc.util.Pair<? extends T> p)
Appends all items from the given list to list of children.
|
Object |
clone() |
AstNode<T> |
cloneWrapException() |
AstNode<T> |
deepClone()
Only children and children's children are cloned by this method.
|
AstNode<T> |
deepCloneWrapException() |
boolean |
equals(Object obj) |
<S extends T> |
get(int index,
Class<S> clazz)
Same as get(index) but casts the node to the specified type.
|
String[] |
getChildNames()
Returns the names of the children.
|
AstLocation |
getNativeLocation() |
String |
getNodeName()
Returns the name of this node.
|
int |
getNodeType()
Returns an integer value that identifies the node type.
|
String |
getNodeTypeName()
Returns the fully qualified name of this node's class.
|
boolean |
isList()
Determine whether this node can have a variable number of children and
implements the
List interface (or parts of it). |
boolean |
isNodeType(int testType)
Returns
true if the given node type equals the node type
returned by getNodeType(). |
void |
setNativeLocation(AstLocation location) |
void |
toString(Appendable out) |
clearAttributes, getAttribute, getAttributes, getBooleanAttribute, getIntAttribute, getStringAttribute, hasAttribute, hasAttributes, removeAttribute, setAttribute, setAttributes, setBooleanAttribute, setIntAttribute, setStringAttributegetProperty, getProperty, getPropertyCount, hasProperties, hasProperty, propertyIterator, setPropertygetLocation, hasLocation, setLocation, setLocationadd, add, addAll, addAll, clear, contains, containsAll, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArrayparallelStream, removeIf, streamstatic final int NT_CUSTOM_BIT
static final int NT_UNTYPED
static final int NT_NODE_LIST
static final int NT_PARSER_ENTITY
static final int NT_TUPLE_1
static final int NT_TUPLE_2
static final int NT_TUPLE_3
static final int NT_TUPLE_4
static final int NT_TUPLE_5
static final int NT_TEXT
static final String[] EMPTY_CHILD_NAMES
int getNodeType()
boolean isNodeType(int testType)
true if the given node type equals the node type
returned by getNodeType().String getNodeTypeName()
String getNodeName()
AstLocation getNativeLocation()
void setNativeLocation(AstLocation location)
boolean addAll(xtc.util.Pair<? extends T> p)
true if the list of children has changed.<S extends T> S get(int index, Class<S> clazz)
boolean isList()
List interface (or parts of it).String[] getChildNames()
void toString(Appendable out) throws IOException
IOExceptionboolean equals(Object obj)
Object clone() throws CloneNotSupportedException
CloneNotSupportedExceptionAstNode<T> deepClone() throws CloneNotSupportedException
CloneNotSupportedExceptionCopyright © 2009–2017 University of Erlangen-Nürnberg - Open Source Research Group. All rights reserved.