org.openide.util.lookup
Class InheritanceTree.Node

java.lang.Object
  extended by java.lang.ref.Reference<T>
      extended by java.lang.ref.WeakReference<java.lang.Class>
          extended by org.openide.util.lookup.InheritanceTree.Node
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
InheritanceTree

static final class InheritanceTree.Node
extends java.lang.ref.WeakReference<java.lang.Class>
implements java.io.Serializable

Node in the tree.


Field Summary
 java.util.ArrayList<InheritanceTree.Node> children
          children nodes
 java.util.Collection<AbstractLookup.Pair> items
          list of items assigned to this node (suspect to be subclasses)
(package private) static long serialVersionUID
           
 
Constructor Summary
InheritanceTree.Node(java.lang.Class clazz)
          Constructor.
 
Method Summary
 boolean accepts(AbstractLookup.Pair<?> item)
          Checks whether item is instance of this node.
 boolean accepts(java.lang.Class<?> clazz)
          Checks whether a node can represent an class.
 boolean assignItem(InheritanceTree tree, AbstractLookup.Pair<?> item)
          Assings an item to this node.
 boolean deserialized()
          Returns true if the object was deserialized also clears the serialized flag.
 java.lang.Class<?> getType()
          Getter for the type associated with this node.
 void markDeserialized()
          Marks this item as being deserialized.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.ref.Reference
clear, enqueue, get, isEnqueued
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

children

public java.util.ArrayList<InheritanceTree.Node> children
children nodes


items

public java.util.Collection<AbstractLookup.Pair> items
list of items assigned to this node (suspect to be subclasses)

Constructor Detail

InheritanceTree.Node

public InheritanceTree.Node(java.lang.Class clazz)
Constructor.

Method Detail

deserialized

public boolean deserialized()
Returns true if the object was deserialized also clears the serialized flag.

Returns:
true if so.

markDeserialized

public void markDeserialized()
Marks this item as being deserialized.


getType

public java.lang.Class<?> getType()
Getter for the type associated with this node.


accepts

public boolean accepts(java.lang.Class<?> clazz)
Checks whether a node can represent an class.


accepts

public boolean accepts(AbstractLookup.Pair<?> item)
Checks whether item is instance of this node.


assignItem

public boolean assignItem(InheritanceTree tree,
                          AbstractLookup.Pair<?> item)
Assings an item to this node.

Parameters:
item - the item
Returns:
true if item has been added as new

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object