public class VariableNode extends Object implements MutableTreeNode
| Modifier and Type | Field and Description |
|---|---|
protected List<MutableTreeNode> |
children |
protected String |
name |
protected MutableTreeNode |
parent |
protected String |
type |
static int |
TYPE_ARRAY |
static int |
TYPE_BOOLEAN |
static int |
TYPE_BYTE |
static int |
TYPE_CHAR |
static int |
TYPE_DOUBLE |
static int |
TYPE_FLOAT |
static int |
TYPE_INTEGER |
static int |
TYPE_LONG |
static int |
TYPE_OBJECT |
static int |
TYPE_SHORT |
static int |
TYPE_STRING |
static int |
TYPE_UNKNOWN |
static int |
TYPE_VOID |
protected com.sun.jdi.Value |
value |
| Constructor and Description |
|---|
VariableNode(String name,
String type,
com.sun.jdi.Value value)
Construct a
VariableNode. |
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(VariableNode c)
Add a
VariableNode as child. |
void |
addChildren(List<VariableNode> children)
Add multiple
VariableNodes as children. |
Enumeration<MutableTreeNode> |
children() |
boolean |
equals(Object obj)
Test for equality.
|
boolean |
getAllowsChildren() |
TreeNode |
getChildAt(int i) |
int |
getChildCount() |
String |
getDescription()
Get a String description of this
VariableNode. |
int |
getIndex(TreeNode tn) |
String |
getName() |
TreeNode |
getParent() |
String |
getStringValue()
Get a String representation of this variable nodes value.
|
int |
getType() |
String |
getTypeName() |
com.sun.jdi.Value |
getValue() |
int |
hashCode()
Returns a hash code based on type, name and value.
|
void |
insert(MutableTreeNode mtn,
int i) |
boolean |
isLeaf()
This controls the default icon and disclosure triangle.
|
void |
remove(int i) |
void |
remove(MutableTreeNode mtn) |
void |
removeAllChildren()
Remove all children from this
VariableNode. |
void |
removeFromParent() |
void |
setName(String name) |
void |
setParent(MutableTreeNode mtn) |
void |
setUserObject(Object o) |
void |
setValue(com.sun.jdi.Value value) |
String |
toString()
Get a String representation of this
VariableNode. |
public static final int TYPE_UNKNOWN
public static final int TYPE_OBJECT
public static final int TYPE_ARRAY
public static final int TYPE_INTEGER
public static final int TYPE_FLOAT
public static final int TYPE_BOOLEAN
public static final int TYPE_CHAR
public static final int TYPE_STRING
public static final int TYPE_LONG
public static final int TYPE_DOUBLE
public static final int TYPE_BYTE
public static final int TYPE_SHORT
public static final int TYPE_VOID
protected String type
protected String name
protected com.sun.jdi.Value value
protected List<MutableTreeNode> children
protected MutableTreeNode parent
public VariableNode(String name, String type, com.sun.jdi.Value value)
VariableNode.name - the nametype - the typevalue - the valuepublic void setValue(com.sun.jdi.Value value)
public com.sun.jdi.Value getValue()
public String getStringValue()
public String getTypeName()
public int getType()
public String getName()
public void setName(String name)
public void addChild(VariableNode c)
VariableNode as child.c - the VariableNode to add.public void addChildren(List<VariableNode> children)
VariableNodes as children.children - the list of VariableNodes to add.public TreeNode getChildAt(int i)
getChildAt in interface TreeNodepublic int getChildCount()
getChildCount in interface TreeNodepublic boolean getAllowsChildren()
getAllowsChildren in interface TreeNodepublic boolean isLeaf()
public Enumeration<MutableTreeNode> children()
public String toString()
VariableNode.public String getDescription()
VariableNode. Contains the type,
name and value.public void insert(MutableTreeNode mtn, int i)
insert in interface MutableTreeNodepublic void remove(int i)
remove in interface MutableTreeNodepublic void remove(MutableTreeNode mtn)
remove in interface MutableTreeNodepublic void removeAllChildren()
VariableNode.public void setUserObject(Object o)
setUserObject in interface MutableTreeNodepublic void removeFromParent()
removeFromParent in interface MutableTreeNodepublic void setParent(MutableTreeNode mtn)
setParent in interface MutableTreeNodepublic boolean equals(Object obj)
VariableNodes need to have
equal type, name and value.equals in class Objectobj - the object to test for equality with this VariableNodeVariableNodeCopyright © 2001–2017 Processing Foundation. All rights reserved.