com.googlecode.lightest.core
Class TaskNode

java.lang.Object
  extended by groovy.util.Node
      extended by com.googlecode.lightest.core.TaskNode
All Implemented Interfaces:
groovy.lang.GroovyObject, Serializable

public class TaskNode
extends groovy.util.Node
implements groovy.lang.GroovyObject

The behavior is TaskNode differs from Node in that children() will never include the original value specified when creating the node in the resulting NodeList. That was a curious decision for the implementation of Node. This original value may be obtained by using the nodeValue() method, instead of value(), and may be set by passing a non-List object into setValue(). This class is (hopefully) thread-safe.

See Also:
Serialized Form

Constructor Summary
TaskNode(groovy.util.Node parent, Object name)
           
TaskNode(groovy.util.Node parent, Object name, Map attributes)
           
TaskNode(groovy.util.Node parent, Object name, Map attributes, Object value)
           
TaskNode(groovy.util.Node parent, Object name, Object value)
           
 
Method Summary
 List children()
           
 Object getAttribute(String attrName)
           
 groovy.lang.MetaClass getMetaClass()
           
 Object getProperty(String name)
           
 Object invokeMethod(String name, Object args)
           
 Object nodeValue()
          Returns the single, non-List value specified when creating the Node, if any.
 void setAttribute(String attrName, Object attrValue)
           
 void setMetaClass(groovy.lang.MetaClass metaClass)
           
 void setProperty(String name, Object value)
           
 void setValue(Object value)
           
 
Methods inherited from class groovy.util.Node
append, appendNode, appendNode, appendNode, appendNode, attribute, attributes, breadthFirst, depthFirst, get, getAt, iterator, name, parent, print, remove, setMetaClass, text, toString, value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TaskNode

public TaskNode(groovy.util.Node parent,
                Object name)

TaskNode

public TaskNode(groovy.util.Node parent,
                Object name,
                Object value)

TaskNode

public TaskNode(groovy.util.Node parent,
                Object name,
                Map attributes)

TaskNode

public TaskNode(groovy.util.Node parent,
                Object name,
                Map attributes,
                Object value)
Method Detail

children

public List children()
Overrides:
children in class groovy.util.Node

setValue

public void setValue(Object value)
Overrides:
setValue in class groovy.util.Node

nodeValue

public Object nodeValue()
Returns the single, non-List value specified when creating the Node, if any.


setAttribute

public void setAttribute(String attrName,
                         Object attrValue)

getAttribute

public Object getAttribute(String attrName)

getMetaClass

public groovy.lang.MetaClass getMetaClass()
Specified by:
getMetaClass in interface groovy.lang.GroovyObject

setMetaClass

public void setMetaClass(groovy.lang.MetaClass metaClass)
Specified by:
setMetaClass in interface groovy.lang.GroovyObject

invokeMethod

public Object invokeMethod(String name,
                           Object args)
Specified by:
invokeMethod in interface groovy.lang.GroovyObject

getProperty

public Object getProperty(String name)
Specified by:
getProperty in interface groovy.lang.GroovyObject

setProperty

public void setProperty(String name,
                        Object value)
Specified by:
setProperty in interface groovy.lang.GroovyObject


Copyright © 2009. All Rights Reserved.