edu.wpi.ebob.internal.inspect
Class ReturnValueNode

java.lang.Object
  extended by edu.wpi.ebob.internal.inspect.AbstractNode
      extended by edu.wpi.ebob.internal.inspect.ReturnValueNode
All Implemented Interfaces:
Node

public class ReturnValueNode
extends AbstractNode

A Return value node represents an object that is returned from a computation, which can be unnamed.

Author:
Liam Morley

Field Summary
private  boolean hasCheckedForChildren
           
private  IObject obj
           
private  IClass type
           
 
Fields inherited from class edu.wpi.ebob.internal.inspect.AbstractNode
children
 
Constructor Summary
ReturnValueNode(IClass type, IObject obj)
           
 
Method Summary
 Node[] getChildren()
          returns the child nodes of this node, represented as objects.
 org.eclipse.swt.graphics.Image getImage()
          returns the image that should be shown for this node.
 java.lang.String getName()
          the text label for this node.
 IClass getType()
          returns the Class object associated with this node.
 IObject getValue()
          the underlying value for this node.
 java.lang.String getValueAsString()
          returns the toString() of Node.getValue().
 boolean hasChildren()
           
 
Methods inherited from class edu.wpi.ebob.internal.inspect.AbstractNode
addChild, getParent, setParent, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

obj

private IObject obj

type

private IClass type

hasCheckedForChildren

private boolean hasCheckedForChildren
Constructor Detail

ReturnValueNode

public ReturnValueNode(IClass type,
                       IObject obj)
Method Detail

getName

public java.lang.String getName()
Description copied from interface: Node
the text label for this node.

See Also:
Node.getName()

getValue

public IObject getValue()
Description copied from interface: Node
the underlying value for this node.

See Also:
Node.getValue()

getValueAsString

public java.lang.String getValueAsString()
Description copied from class: AbstractNode
returns the toString() of Node.getValue().

Specified by:
getValueAsString in interface Node
Overrides:
getValueAsString in class AbstractNode
See Also:
Node.getValueAsString()

getType

public IClass getType()
Description copied from interface: Node
returns the Class object associated with this node.

See Also:
Node.getType()

getChildren

public Node[] getChildren()
Description copied from interface: Node
returns the child nodes of this node, represented as objects.

Specified by:
getChildren in interface Node
Overrides:
getChildren in class AbstractNode
See Also:
Node.getChildren()

hasChildren

public boolean hasChildren()
Specified by:
hasChildren in interface Node
Overrides:
hasChildren in class AbstractNode
Returns:
true if the object is non-null and any of the following are true:
  1. the object is an array with a length greater than 0
  2. the object is not-primitive and has at least one declared field
See Also:
Node.hasChildren()

getImage

public org.eclipse.swt.graphics.Image getImage()
Description copied from interface: Node
returns the image that should be shown for this node.

Specified by:
getImage in interface Node
Overrides:
getImage in class AbstractNode
Returns:
null
See Also:
Node.getImage()