Package jadex.base.gui
Class ObjectTreeModel.ObjectInspectorNode
- java.lang.Object
-
- jadex.base.gui.ObjectTreeModel.ObjectInspectorNode
-
- Enclosing class:
- ObjectTreeModel
public class ObjectTreeModel.ObjectInspectorNode extends java.lang.Object
TreeModel node for java object inspection
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List
children
The children of this node (cached)protected java.util.List
fields
The list of fields of the represented objectprotected java.lang.String
name
The name for this node e.g.protected java.lang.String
namePrefix
A prefix to display with name, e.g.protected java.lang.Object
nodeObject
The object represented by this nodeprotected int
nodeUUID
A unique id for this nodeprotected java.lang.Object
parent
The parent nodeprotected java.lang.Object[]
path
The path from the root node to this node.protected java.lang.Class
type
The Class type for this node
-
Constructor Summary
Constructors Constructor Description ObjectInspectorNode(java.lang.Object parent, java.lang.Class type, java.lang.String name, java.lang.Object object)
Create a ObjectInspectorNodeObjectInspectorNode(java.lang.Object parent, java.lang.Class type, java.lang.String namePrefix, java.lang.String name, java.lang.Object object)
Create a ObjectInspectorNode
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
protected boolean
equals(java.lang.Object obj, boolean checkUUID)
This method can be used to do a sematically equals check.java.util.List
getChildren()
Get the children of this node.java.util.List
getFields()
Generate and return a List of all fields for the object represented by this node.protected java.lang.Object
getNodeObject()
Access the object represented by this nodejava.lang.Object[]
getPath()
Get the path of this node (inclusive) starting from the root node.int
hashCode()
protected boolean
isInpsectionRootNode()
java.lang.String
toString()
Get a string representation of this node
-
-
-
Field Detail
-
type
protected java.lang.Class type
The Class type for this node
-
nodeObject
protected java.lang.Object nodeObject
The object represented by this node
-
fields
protected java.util.List fields
The list of fields of the represented object
-
name
protected java.lang.String name
The name for this node e.g. the objects name
-
namePrefix
protected java.lang.String namePrefix
A prefix to display with name, e.g. for arrays "[index]"
-
parent
protected java.lang.Object parent
The parent node
-
children
protected java.util.List children
The children of this node (cached)
-
path
protected java.lang.Object[] path
The path from the root node to this node.
-
nodeUUID
protected int nodeUUID
A unique id for this node
-
-
Constructor Detail
-
ObjectInspectorNode
public ObjectInspectorNode(java.lang.Object parent, java.lang.Class type, java.lang.String name, java.lang.Object object)
Create a ObjectInspectorNode- Parameters:
type
- Class type for this object (e.g. myObject.class)name
- for this nodeobject
- to inspect
-
ObjectInspectorNode
public ObjectInspectorNode(java.lang.Object parent, java.lang.Class type, java.lang.String namePrefix, java.lang.String name, java.lang.Object object)
Create a ObjectInspectorNode- Parameters:
type
- Class type for this object (e.g. myObject.class)name
- for this nodeobject
- to inspect
-
-
Method Detail
-
getFields
public java.util.List getFields()
Generate and return a List of all fields for the object represented by this node.- Returns:
- List of accessible node object fields
-
getChildren
public java.util.List getChildren()
Get the children of this node.
-
getPath
public java.lang.Object[] getPath()
Get the path of this node (inclusive) starting from the root node.
-
getNodeObject
protected java.lang.Object getNodeObject()
Access the object represented by this node- Returns:
- the nodeObject Attribute
-
isInpsectionRootNode
protected boolean isInpsectionRootNode()
-
equals
protected boolean equals(java.lang.Object obj, boolean checkUUID)
This method can be used to do a sematically equals check. E.g. check only the fields, not the unique identifier.- Parameters:
obj
- Object to test for equalscheckUUID
- flag to check the unique Identifier for the node.
true=do a compete equals check
false=do a sematically equals check
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
-
toString
public java.lang.String toString()
Get a string representation of this node- Overrides:
toString
in classjava.lang.Object
-
-