|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--simkin.ExecutableRoot | +--simkin.TreeNodeObject
This class provides and Executable interface to a TreeNode
The method getValue, setValue and method all search for matching child labels within the TreeNode object. Only the first matching tag is used.
Constructor Summary | |
TreeNodeObject(TreeNode node)
Constructor |
Method Summary | |
void |
dump()
This method writes the entire node tree to stdout |
TreeNodeObjectEnumerator |
enumerate()
This method returns an object which can iterate over all the immediate child node of this node |
TreeNodeObjectEnumerator |
enumerate(java.lang.String label)
This method returns an object which can iterate over all the immediate child nodes of this node whose label matches the one given |
boolean |
equals(java.lang.Object o)
|
TreeNode |
getNode()
|
java.lang.Object |
getValue(java.lang.String s,
java.lang.String attribute)
this method retrieves a value from the in-memory treenode object. |
java.lang.Object |
method(java.lang.String s,
java.lang.Object[] args)
this method attempts to find the named method within the in-memory treenode object. |
void |
setValue(java.lang.String s,
java.lang.String attribute,
java.lang.Object v)
this method stores a value in the in-memory treenode object. |
java.lang.String |
toString()
|
Methods inherited from class simkin.ExecutableRoot |
setTracer |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public TreeNodeObject(TreeNode node)
node
- the treenode to be storedMethod Detail |
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public TreeNode getNode()
public void setValue(java.lang.String s, java.lang.String attribute, java.lang.Object v) throws java.lang.RuntimeException, java.lang.NoSuchFieldException
setValue
in class ExecutableRoot
s
- the name of the valuev
- the value itselfjava.lang.RuntimeException
- - if there was a problem running the script (such as not having permission to access a field)java.lang.NoSuchFieldException
- - if the field could not be foundpublic java.lang.Object getValue(java.lang.String s, java.lang.String attribute) throws java.lang.RuntimeException, java.lang.NoSuchFieldException
getValue
in class ExecutableRoot
s
- the name of the valuev
- the value to receive the valuejava.lang.RuntimeException
- - if there was a problem running the script (such as not having permission to access a field)java.lang.NoSuchFieldException
- - if the field could not be foundpublic TreeNodeObjectEnumerator enumerate()
public TreeNodeObjectEnumerator enumerate(java.lang.String label)
public void dump()
public java.lang.Object method(java.lang.String s, java.lang.Object[] args) throws ParseException, java.lang.RuntimeException, java.lang.NoSuchMethodException
method
in class ExecutableRoot
s
- the name of the methodargs
- an array of arguments to the methodret
- the object to receive the result of the method callParseException
- if the code contained syntax errorsjava.lang.NoSuchMethodException
- if the method could not be foundjava.lang.RuntimeException
- if there was an error running the code
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |