Class OAVTreeModel.ObjectInspectorNode

  • Enclosing class:
    OAVTreeModel

    public class OAVTreeModel.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 object
      protected 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 node
      protected int nodeUUID
      A unique id for this node
      protected java.lang.Object parent
      The parent node
      protected 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 ObjectInspectorNode
      ObjectInspectorNode​(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
      void drop()
      Unregister a node and its subnodes.
      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 node
      java.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
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • 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 node
        object - 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 node
        object - 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.
      • drop

        public void drop()
        Unregister a node and its subnodes.
      • 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 equals
        checkUUID - flag to check the unique Identifier for the node. true=do a compete equals checkfalse=do a sematically equals check
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
      • toString

        public java.lang.String toString()
        Get a string representation of this node
        Overrides:
        toString in class java.lang.Object