public class XdeclTable extends Xnode
LHS, RHS, UNDEF_DEPTH
Constructor and Description |
---|
XdeclTable(Xnode node)
Element standard ctor.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Xnode decl)
Add a new declaration as last element.
|
void |
addFirst(Xnode decl)
Add a new declaration as last element.
|
void |
checkOrder(FfunctionDefinition fct)
Check if the order of declaration makes sense.
|
XdeclTable |
cloneNode()
Clone the current element with all its children.
|
boolean |
contains(java.lang.String name)
Check if a name is already present in the declaration table.
|
int |
count()
Get the number of declarations in the table.
|
Xnode |
get(java.lang.String key)
Get a specific declaration based on its name.
|
void |
replace(Xnode decl,
java.lang.String name)
Replace a declaration in the table.
|
java.util.List<Xnode> |
uses()
Get all the use and use only declaration in the table.
|
java.util.List<Xnode> |
values()
Get all elements in the table.
|
java.util.List<Xnode> |
values(java.util.List<Xcode> declarations)
Get all declarations of a specific kind of elements.
|
java.util.List<Xnode> |
values(Xcode decl)
Get all declarations of a specific kind of elements.
|
ancestor, append, append, body, child, children, cloneRawNode, compareFirstChildValues, compareOptionalValues, compareValues, constructRepresentation, copyAttribute, copyEnhancedInfo, delete, deleteWithSiblings, depth, element, equals, filename, findParentFunction, findParentModule, firstChild, getAttribute, getBooleanAttribute, getType, hasAttribute, hasBody, hashCode, hasSameParentBlock, insert, insert, insertAfter, insertBefore, isDeleted, isDirectSibling, isNestedIn, lastChild, lineNo, matchAll, matchAllAncestor, matchAllAncestor, matchAncestor, matchDescendant, matchDirectDescendant, matchDirectDescendant, matchSeq, matchSibling, nextSibling, opcode, prevSibling, removeAttribute, setAttribute, setBooleanAttribute, setFilename, setLine, setType, setValue, toString, value
public XdeclTable(Xnode node)
node
- Raw node.public void replace(Xnode decl, java.lang.String name)
decl
- The new declaration to be inserted.name
- Name describing the declaration in the table.public void add(Xnode decl)
decl
- The new declaration object.public void addFirst(Xnode decl)
decl
- The new declaration object.public Xnode get(java.lang.String key)
key
- The name of the declaration to be returned.public java.util.List<Xnode> values()
public java.util.List<Xnode> values(Xcode decl)
decl
- Kind of elements to return.public java.util.List<Xnode> values(java.util.List<Xcode> declarations)
declarations
- Kind of elements to return.public java.util.List<Xnode> uses()
public int count()
public boolean contains(java.lang.String name)
name
- String value of the name to check.public void checkOrder(FfunctionDefinition fct)
fct
- Function definition which is checked.public XdeclTable cloneNode()
Xnode