org.designwizard.design
Class PackageNode

java.lang.Object
  extended by org.designwizard.design.AbstractEntity
      extended by org.designwizard.design.PackageNode
All Implemented Interfaces:
Entity

public class PackageNode
extends AbstractEntity
implements Entity

PackageNode objects are constructed automatically by the DesignWizard class when classes are loaded. To get access to a desired package extracted, do not use the constructor of this class. Instead, use the class DesignWizard as it follows:

                DesignWizard dw = new DesignWizard("/home/user/application/classes");
                PackageNode c = dw.getPackage("foo.bar.mypackage")
 
Instances of the class PackageNode represent packages in the code extracted.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.designwizard.design.Entity
Entity.TypesOfEntities
 
Field Summary
 
Fields inherited from class org.designwizard.design.AbstractEntity
modifiers, name, relations, type
 
Constructor Summary
PackageNode(java.lang.String entity)
           
 
Method Summary
 boolean equals(java.lang.Object other)
           
 java.util.Set<ClassNode> getAllClasses()
          Returns a java.util.Set containing ClassNode objects reflecting all the classes inside the package represented by this PackageNode.
 java.util.Set<MethodNode> getAllMethods()
          Returns a java.util.Set containing MethodNode objects reflecting all the methods inside the package represented by this PackageNode.
 java.util.Set<ClassNode> getCalleeClasses()
          Returns a java.util.Set containing ClassNode objects reflecting all the classes that are referenced by the classes inside the package represented by this PackageNode.
 java.util.Set<MethodNode> getCalleeMethods()
          Returns a Set of MethodNode containing the methods that are called by this Entity.
 java.util.Set<PackageNode> getCalleePackages()
          Returns a java.util.Set containing PackageNode objects reflecting all the packages that are referenced by the package represented by this PackageNode.
 java.util.Set<ClassNode> getCallerClasses()
          Returns a java.util.Set containing ClassNode objects reflecting all the classes that reference the package represented by this PackageNode.
 java.util.Set<MethodNode> getCallerMethods()
          Returns a java.util.Set containing MethodNode objects reflecting all the methods that reference the classes or interfaces inside the package represented by this .
 java.util.Set<PackageNode> getCallerPackages()
          Returns a java.util.Set containing PackageNode objects reflecting all the packages that reference the package represented by this PackageNode.
 java.lang.String getClassName()
          Returns the name of the class that represents this Entity object.
 ClassNode getClassNode()
          Returns the ClassNode that represents this Entity object.
 java.util.List<java.lang.String[]> getImpactOfAChange()
          Returns a List of String arrays that represents the trace of calls.
 PackageNode getPackage()
          Returns the package which this Entity belongs to.
 int hashCode()
           
 
Methods inherited from class org.designwizard.design.AbstractEntity
addModifier, addModifiers, addRelation, containsModifiers, containsRelation, getModifiers, getName, getRelations, getShortName, getTypeOfEntity, getVisibility, isAbstract, removeRelation, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.designwizard.design.Entity
addModifier, addModifiers, addRelation, containsModifiers, containsRelation, getModifiers, getName, getRelations, getShortName, getTypeOfEntity, getVisibility, isAbstract, removeRelation
 

Constructor Detail

PackageNode

public PackageNode(java.lang.String entity)
Method Detail

getClassName

public java.lang.String getClassName()
Description copied from interface: Entity
Returns the name of the class that represents this Entity object. For instance, if this Entity object is a FieldNode, this method will return the name of the class that contains the field. The same is applied to MethodNodes objects. In the case of ClassNode objects, calling this method has the same effect as the designwizard.design.ClassNode.getName() method.

Specified by:
getClassName in interface Entity
Returns:
the name of the class that represents this Entity object.

getClassNode

public ClassNode getClassNode()
Description copied from interface: Entity
Returns the ClassNode that represents this Entity object. For instance, if this Entity object is a FieldNode, this method will return the ClassNode that contains the field. The same is applied to MethodNodes objects.

Specified by:
getClassNode in interface Entity
Returns:
the ClassNode object that represents this Entity object.

getImpactOfAChange

public java.util.List<java.lang.String[]> getImpactOfAChange()
Description copied from interface: Entity
Returns a List of String arrays that represents the trace of calls. The deep of the search is configured on designwizard.properties

Specified by:
getImpactOfAChange in interface Entity
Returns:

getAllClasses

public java.util.Set<ClassNode> getAllClasses()
Returns a java.util.Set containing ClassNode objects reflecting all the classes inside the package represented by this PackageNode.

Returns:
a java.util.Set containing ClassNode objects reflecting all the classes inside the package represented by this PackageNode.

getPackage

public PackageNode getPackage()
Description copied from interface: Entity
Returns the package which this Entity belongs to. If this Entity belongs to the default package, a package with the name "default" is returned.

Specified by:
getPackage in interface Entity
Returns:
the package which this Entity belongs to.

getCallerClasses

public java.util.Set<ClassNode> getCallerClasses()
Returns a java.util.Set containing ClassNode objects reflecting all the classes that reference the package represented by this PackageNode.

Specified by:
getCallerClasses in interface Entity
Specified by:
getCallerClasses in class AbstractEntity
Returns:
A set containing all classes that makes reference to this Entity.

getCalleeClasses

public java.util.Set<ClassNode> getCalleeClasses()
Returns a java.util.Set containing ClassNode objects reflecting all the classes that are referenced by the classes inside the package represented by this PackageNode.

Specified by:
getCalleeClasses in interface Entity
Specified by:
getCalleeClasses in class AbstractEntity
Returns:
A set containing all classes that are referenced by this Entity.

getCallerMethods

public java.util.Set<MethodNode> getCallerMethods()
Returns a java.util.Set containing MethodNode objects reflecting all the methods that reference the classes or interfaces inside the package represented by this .

Specified by:
getCallerMethods in interface Entity
Returns:
a Set containing the methods that calls this Entity.

getCalleeMethods

public java.util.Set<MethodNode> getCalleeMethods()
Description copied from interface: Entity
Returns a Set of MethodNode containing the methods that are called by this Entity.

Specified by:
getCalleeMethods in interface Entity
Returns:
a Set containing the methods that are called by this Entity.

getCallerPackages

public java.util.Set<PackageNode> getCallerPackages()
Returns a java.util.Set containing PackageNode objects reflecting all the packages that reference the package represented by this PackageNode.

Specified by:
getCallerPackages in interface Entity
Returns:
a java.util.Set containing PackageNode objects reflecting all the packages that reference the package represented by this PackageNode.

getCalleePackages

public java.util.Set<PackageNode> getCalleePackages()
Returns a java.util.Set containing PackageNode objects reflecting all the packages that are referenced by the package represented by this PackageNode.

Specified by:
getCalleePackages in interface Entity
Returns:
a java.util.Set containing PackageNode objects reflecting all the packages that are referenced by the package represented by this PackageNode.

getAllMethods

public java.util.Set<MethodNode> getAllMethods()
Returns a java.util.Set containing MethodNode objects reflecting all the methods inside the package represented by this PackageNode.

Returns:
a java.util.Set containing MethodNode objects reflecting all the methods inside the package represented by this PackageNode.

hashCode

public int hashCode()
Overrides:
hashCode in class AbstractEntity

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object