classpathhelper.eclipse.ui.classloaderview
Class ClassElement

java.lang.Object
  extended byclasspathhelper.util.AbstractTree
      extended byclasspathhelper.eclipse.ui.classloaderview.ClassElement
All Implemented Interfaces:
IDecorable, ITree

public class ClassElement
extends AbstractTree
implements IDecorable

Visual tree node representing a ClassDetail representing a class or interface.

Since:
1.0
Author:
bharris

Field Summary
 
Fields inherited from interface classpathhelper.eclipse.ui.IDecorable
BLOCKED, BLOCKED_DIFF, IGNORED, UNREFERENCED, UNRESOLVED, WONTLOAD
 
Constructor Summary
ClassElement(Location theLocation, java.lang.String theClassName, java.lang.String theDisplayName, CGClassLoader theClassLoader, boolean theDisplayContents)
           
 
Method Summary
protected  void determineDecorations()
          Internal method that determines the values of this class with respect to decorations (unresolved, blocked, etc).
 ITree[] getChildren()
          Getter for this nodes children.
 java.lang.String getClassName()
           
 Image getIconName()
          The associated Icon.
 boolean hasChildren()
          Does this node have children.
 boolean hasUnresolved()
          Getter for unresolved flag.
 boolean hasWontLoad()
          Will this not load or does this element contain elements that won't load.
 boolean isBlocked()
          Getter method indicating whether this class is blocked.
 boolean isBlockedDiffVersion()
          Getter method indicating whether this class is blocked by a different version.
 boolean isIgnored()
          method required by IDecorable, always returns false.
 boolean isUnreferenced()
          Is this element referred to by anyone?
protected  void loadBlockedLocations()
          Internal method for loading blocked locations.
protected  void loadChildren()
          Method called to load the visual children of this node.
protected  void loadDependentLocations()
          Internal method for loading dependent locations.
protected  void loadReferredToByClasses()
          Creates child nodes for the classes that refer to the class associated with this element.
protected  void loadUnresolvedClasses()
          Internal method for loading unresolved classes.
 void setBlocked(boolean blocked)
          Setter method, indicating whether this class is blocked.
 void setBlockedDiffVersion(boolean blocked)
          Setter method, indicating whether this class is blocked by a class with a different version.
 void setHasUnresolved(boolean unresolved)
          Setter method to indicate whether this class has unresolved references.
 void setUnreferenced(boolean unreferenced)
          Setter method for the flag indicating whether or not this class is unreferenced.
 void setWontLoad(boolean theWontLoad)
          Sets whether this class wont load or not.
 boolean supportingDecorations()
          Flag indicating whether or not this node should display decorations
 java.lang.String toString()
           
 
Methods inherited from class classpathhelper.util.AbstractTree
addChild, addChildren, getParent, getRoot, removeAllChildren, removeChild, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClassElement

public ClassElement(Location theLocation,
                    java.lang.String theClassName,
                    java.lang.String theDisplayName,
                    CGClassLoader theClassLoader,
                    boolean theDisplayContents)
Parameters:
theLocation - The location to load the class details from.
theClassName - The name of the class represented by this object.
theDisplayName - The name to display, often the classname with its package stripped out.
theClassLoader - The ClassLoader to load the detail information from.
theDisplayContents - boolean indicating whether or not the class should have children to display its contents.
Since:
1.0
Method Detail

getClassName

public java.lang.String getClassName()
Returns:
The name of the class associated with this element.
Since:
1.0

setBlocked

public void setBlocked(boolean blocked)
Setter method, indicating whether this class is blocked.

Parameters:
blocked - flag indicating whether or not this class element is blocked by another location on the classpath.
Since:
1.0

isBlocked

public boolean isBlocked()
Getter method indicating whether this class is blocked.

Specified by:
isBlocked in interface IDecorable
Returns:
true if this class is blocked, otherwise false
Since:
1.0

setUnreferenced

public void setUnreferenced(boolean unreferenced)
Setter method for the flag indicating whether or not this class is unreferenced.

Parameters:
unreferenced - The new value.
Since:
1.0

isUnreferenced

public boolean isUnreferenced()
Description copied from interface: IDecorable
Is this element referred to by anyone?

Specified by:
isUnreferenced in interface IDecorable
Returns:
true if this element has no references to it (other than possibly itself), otherwise false.

isIgnored

public boolean isIgnored()
method required by IDecorable, always returns false.

Specified by:
isIgnored in interface IDecorable
Returns:
false
Since:
1.0

setBlockedDiffVersion

public void setBlockedDiffVersion(boolean blocked)

Setter method, indicating whether this class is blocked by a class with a different version.

This property is subtly different from setBlocked(boolean) in that this property also indicates that the blocking class is different from the class at this location.

Parameters:
blocked - flag indicating whether or not this class element is blocked by another location on the classpath.
Since:
1.0

isBlockedDiffVersion

public boolean isBlockedDiffVersion()
Getter method indicating whether this class is blocked by a different version.

Specified by:
isBlockedDiffVersion in interface IDecorable
Returns:
true if this class is blocked, otherwise false
Since:
1.0

setHasUnresolved

public void setHasUnresolved(boolean unresolved)
Setter method to indicate whether this class has unresolved references.

Parameters:
unresolved - The unresolved flag.
Since:
1.0

hasUnresolved

public boolean hasUnresolved()
Getter for unresolved flag.

Specified by:
hasUnresolved in interface IDecorable
Returns:
true if this class has unresolved references otherwise, false.
Since:
1.0

supportingDecorations

public boolean supportingDecorations()
Flag indicating whether or not this node should display decorations

Specified by:
supportingDecorations in interface IDecorable
Returns:
true If decorations should be shown otherwise false
Since:
1.1

hasWontLoad

public boolean hasWontLoad()
Description copied from interface: IDecorable
Will this not load or does this element contain elements that won't load. Elements typically won't load if something they depend on won't load.

Specified by:
hasWontLoad in interface IDecorable
Returns:
true if this node has elements that won't load (possibly itself), otherwise false

setWontLoad

public void setWontLoad(boolean theWontLoad)
Sets whether this class wont load or not.

Parameters:
theWontLoad -
Since:
1.1

determineDecorations

protected void determineDecorations()
Internal method that determines the values of this class with respect to decorations (unresolved, blocked, etc).

Since:
1.0

loadChildren

protected void loadChildren()
Method called to load the visual children of this node. The visual children of a class object are its dependent locations, unresolved classes or it's blocked locations.

Since:
1.0

loadBlockedLocations

protected void loadBlockedLocations()
Internal method for loading blocked locations.

Since:
1.0

loadDependentLocations

protected void loadDependentLocations()
Internal method for loading dependent locations.

Since:
1.0

loadUnresolvedClasses

protected void loadUnresolvedClasses()
Internal method for loading unresolved classes.

Since:
1.0

loadReferredToByClasses

protected void loadReferredToByClasses()
Creates child nodes for the classes that refer to the class associated with this element.

Since:
1.0

getIconName

public Image getIconName()
Description copied from interface: ITree
The associated Icon.

Specified by:
getIconName in interface ITree
Returns:
The Icon for this node.

hasChildren

public boolean hasChildren()
Description copied from interface: ITree
Does this node have children.

Specified by:
hasChildren in interface ITree
Overrides:
hasChildren in class AbstractTree

getChildren

public ITree[] getChildren()
Description copied from interface: ITree
Getter for this nodes children.

Specified by:
getChildren in interface ITree
Overrides:
getChildren in class AbstractTree

toString

public java.lang.String toString()