com.sun.jini.tool.classdepend
Class ClassDependencyRelationship

java.lang.Object
  extended by com.sun.jini.tool.classdepend.ClassDependencyRelationship

public class ClassDependencyRelationship
extends Object

A container to store class dependency related information for later analysis.

Author:
Peter Firmstone
See Also:
ClassDepend

Field Summary
private  Set dependants
           
private  String fullyQualifiedClassName
           
private  int hash
           
private  Set providers
           
private  boolean rootClass
           
 
Constructor Summary
ClassDependencyRelationship(String fullyQualifiedClassName)
           
ClassDependencyRelationship(String fullyQualifiedClassName, boolean rootClass)
           
 
Method Summary
private  void addDependant(ClassDependencyRelationship dependant)
           
 void addProvider(ClassDependencyRelationship provider)
          Add a provider class to this dependant class.
 boolean equals(Object o)
           
 Set getDependants()
          Get the classes dependant on this class.
 Set getProviders()
          Get the classes that this class needs to function.
 int hashCode()
           
 boolean isRootClass()
          If this a root dependant, the class was used to discover dependencies.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

dependants

private final Set dependants

providers

private final Set providers

fullyQualifiedClassName

private final String fullyQualifiedClassName

hash

private final int hash

rootClass

private final boolean rootClass
Constructor Detail

ClassDependencyRelationship

ClassDependencyRelationship(String fullyQualifiedClassName,
                            boolean rootClass)

ClassDependencyRelationship

ClassDependencyRelationship(String fullyQualifiedClassName)
Method Detail

addDependant

private void addDependant(ClassDependencyRelationship dependant)

addProvider

public void addProvider(ClassDependencyRelationship provider)
Add a provider class to this dependant class.

Parameters:
provider -

getDependants

public Set getDependants()
Get the classes dependant on this class.

Returns:
classes dependant on this

getProviders

public Set getProviders()
Get the classes that this class needs to function.

Returns:
a Set of classes

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

isRootClass

public boolean isRootClass()
If this a root dependant, the class was used to discover dependencies.

Returns:
true or false


Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.