org.objectweb.dsrg.sofa.util
Class DependencyCalculator

java.lang.Object
  extended by org.objectweb.dsrg.sofa.util.DependencyCalculator

public class DependencyCalculator
extends java.lang.Object

Class that searches for first class entities that given entity is dependent on. When cloning an entity, use this class to determine, which entities need also be cloned.


Nested Class Summary
static class DependencyCalculator.SearchMode
          Affects the way how the DependencyCalculator searches the dependencies.
 
Constructor Summary
DependencyCalculator()
           
 
Method Summary
static EntitiesSet seekDependecies(EntitiesSet entities, DependencyCalculator.SearchMode searchMode)
          When cloning an entity, use this method to determine, which entities need also be cloned.
static EntitiesSet seekDependecies(EntitiesSet entities, EntitiesSet dl, DependencyCalculator.SearchMode searchMode)
          When cloning an entity, use this method to determine, which entities need also be cloned.
static EntitiesSet seekDependencies(Architecture entity, DependencyCalculator.SearchMode searchMode)
          When cloning an entity, use this method to determine, which entities need also be cloned.
static EntitiesSet seekDependencies(Architecture entity, EntitiesSet dl, DependencyCalculator.SearchMode searchMode)
          When cloning an entity, use this method to determine, which entities need also be cloned.
static EntitiesSet seekDependencies(Aspect entity, DependencyCalculator.SearchMode searchMode)
          When cloning an entity, use this method to determine, which entities need also be cloned.
static EntitiesSet seekDependencies(Aspect entity, EntitiesSet dl, DependencyCalculator.SearchMode searchMode)
          When cloning an entity, use this method to determine, which entities need also be cloned.
static EntitiesSet seekDependencies(AssemblyDescriptor entity, DependencyCalculator.SearchMode searchMode)
          When cloning an entity, use this method to determine, which entities need also be cloned.
static EntitiesSet seekDependencies(AssemblyDescriptor entity, EntitiesSet dl, DependencyCalculator.SearchMode searchMode)
          When cloning an entity, use this method to determine, which entities need also be cloned.
static EntitiesSet seekDependencies(CodeBundle entity, DependencyCalculator.SearchMode searchMode)
          When cloning an entity, use this method to determine, which entities need also be cloned.
static EntitiesSet seekDependencies(CodeBundle entity, EntitiesSet dl, DependencyCalculator.SearchMode searchMode)
          When cloning an entity, use this method to determine, which entities need also be cloned.
static EntitiesSet seekDependencies(DeploymentPlan entity, DependencyCalculator.SearchMode searchMode)
          When cloning an entity, use this method to determine, which entities need also be cloned.
static EntitiesSet seekDependencies(DeploymentPlan entity, EntitiesSet dl, DependencyCalculator.SearchMode searchMode)
          When cloning an entity, use this method to determine, which entities need also be cloned.
static EntitiesSet seekDependencies(Frame entity, DependencyCalculator.SearchMode searchMode)
          When cloning an entity, use this method to determine, which entities need also be cloned.
static EntitiesSet seekDependencies(Frame entity, EntitiesSet dl, DependencyCalculator.SearchMode searchMode)
          When cloning an entity, use this method to determine, which entities need also be cloned.
static EntitiesSet seekDependencies(InterfaceType entity, DependencyCalculator.SearchMode searchMode)
          When cloning an entity, use this method to determine, which entities need also be cloned.
static EntitiesSet seekDependencies(InterfaceType entity, EntitiesSet dl, DependencyCalculator.SearchMode searchMode)
          When cloning an entity, use this method to determine, which entities need also be cloned.
static EntitiesSet seekDependencies(MicroComponent entity, DependencyCalculator.SearchMode searchMode)
          When cloning an entity, use this method to determine, which entities need also be cloned.
static EntitiesSet seekDependencies(MicroComponent entity, EntitiesSet dl, DependencyCalculator.SearchMode searchMode)
          When cloning an entity, use this method to determine, which entities need also be cloned.
static EntitiesSet seekDependencies(MicroInterfaceType entity, DependencyCalculator.SearchMode searchMode)
          When cloning an entity, use this method to determine, which entities need also be cloned.
static EntitiesSet seekDependencies(MicroInterfaceType entity, EntitiesSet dl, DependencyCalculator.SearchMode searchMode)
          When cloning an entity, use this method to determine, which entities need also be cloned.
static EntitiesSet seekDependenciesForUnknown(VersionedEntity entity, DependencyCalculator.SearchMode searchMode)
          When cloning an entity, use this method to determine, which entities need also be cloned.
static EntitiesSet seekDependenciesForUnknown(VersionedEntity entity, EntitiesSet dl, DependencyCalculator.SearchMode searchMode)
          When cloning an entity, use this method to determine, which entities need also be cloned.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DependencyCalculator

public DependencyCalculator()
Method Detail

seekDependenciesForUnknown

public static EntitiesSet seekDependenciesForUnknown(VersionedEntity entity,
                                                     DependencyCalculator.SearchMode searchMode)
                                              throws java.lang.IllegalArgumentException
When cloning an entity, use this method to determine, which entities need also be cloned.

Parameters:
entity - The entity for which the dependencies will be searched.
direct - Only direct dependencies, do not search recursively.
Returns:
The set of entities, on that this entity depends.
Throws:
java.lang.IllegalArgumentException - Argument is not a first class repository entity.

seekDependenciesForUnknown

public static EntitiesSet seekDependenciesForUnknown(VersionedEntity entity,
                                                     EntitiesSet dl,
                                                     DependencyCalculator.SearchMode searchMode)
                                              throws java.lang.IllegalArgumentException
When cloning an entity, use this method to determine, which entities need also be cloned.

Parameters:
entity - The entity for which the dependencies will be searched.
dl - Additional dependencies, that will be returned along entity's dependencies.
Returns:
The set of entities, on that this entity depends (+ additional dependencies if any).
Throws:
java.lang.IllegalArgumentException - Argument is not a first class repository entity.

seekDependecies

public static EntitiesSet seekDependecies(EntitiesSet entities,
                                          DependencyCalculator.SearchMode searchMode)
                                   throws java.lang.IllegalArgumentException
When cloning an entity, use this method to determine, which entities need also be cloned.

Parameters:
entities - The entities for which the dependencies will be searched.
Returns:
The set of entities, on that given entities depend (+ additional dependencies if any).
Throws:
java.lang.IllegalArgumentException - One of the entities is not a first class repository entity.

seekDependecies

public static EntitiesSet seekDependecies(EntitiesSet entities,
                                          EntitiesSet dl,
                                          DependencyCalculator.SearchMode searchMode)
                                   throws java.lang.IllegalArgumentException
When cloning an entity, use this method to determine, which entities need also be cloned.

Parameters:
entities - The entities for which the dependencies will be searched.
dl - Additional dependencies, that will be returned along entity's dependencies.
Returns:
The set of entities, on that given entities depend (+ additional dependencies if any).
Throws:
java.lang.IllegalArgumentException - One of the entities is not a first class repository entity.

seekDependencies

public static EntitiesSet seekDependencies(Architecture entity,
                                           DependencyCalculator.SearchMode searchMode)
When cloning an entity, use this method to determine, which entities need also be cloned.

Parameters:
entity - The entity for which the dependencies will be searched.
Returns:
The set of entities, on that this entity depends.

seekDependencies

public static EntitiesSet seekDependencies(Architecture entity,
                                           EntitiesSet dl,
                                           DependencyCalculator.SearchMode searchMode)
When cloning an entity, use this method to determine, which entities need also be cloned.

Parameters:
entity - The entity for which the dependencies will be searched.
dl - Additional dependencies, that will be returned along entity's dependencies.
Returns:
The set of entities, on that this entity depends (+ additional dependencies if any).

seekDependencies

public static EntitiesSet seekDependencies(Frame entity,
                                           DependencyCalculator.SearchMode searchMode)
When cloning an entity, use this method to determine, which entities need also be cloned.

Parameters:
entity - The entity for which the dependencies will be searched.
Returns:
The set of entities, on that this entity depends.

seekDependencies

public static EntitiesSet seekDependencies(Frame entity,
                                           EntitiesSet dl,
                                           DependencyCalculator.SearchMode searchMode)
When cloning an entity, use this method to determine, which entities need also be cloned.

Parameters:
entity - The entity for which the dependencies will be searched.
dl - Additional dependencies, that will be returned along entity's dependencies.
Returns:
The set of entities, on that this entity depends (+ additional dependencies if any).

seekDependencies

public static EntitiesSet seekDependencies(Aspect entity,
                                           DependencyCalculator.SearchMode searchMode)
When cloning an entity, use this method to determine, which entities need also be cloned.

Parameters:
entity - The entity for which the dependencies will be searched.
Returns:
The set of entities, on that this entity depends.

seekDependencies

public static EntitiesSet seekDependencies(Aspect entity,
                                           EntitiesSet dl,
                                           DependencyCalculator.SearchMode searchMode)
When cloning an entity, use this method to determine, which entities need also be cloned.

Parameters:
entity - The entity for which the dependencies will be searched.
dl - Additional dependencies, that will be returned along entity's dependencies.
Returns:
The set of entities, on that this entity depends (+ additional dependencies if any).

seekDependencies

public static EntitiesSet seekDependencies(CodeBundle entity,
                                           DependencyCalculator.SearchMode searchMode)
When cloning an entity, use this method to determine, which entities need also be cloned.

Parameters:
entity - The entity for which the dependencies will be searched.
Returns:
The set of entities, on that this entity depends.

seekDependencies

public static EntitiesSet seekDependencies(CodeBundle entity,
                                           EntitiesSet dl,
                                           DependencyCalculator.SearchMode searchMode)
When cloning an entity, use this method to determine, which entities need also be cloned.

Parameters:
entity - The entity for which the dependencies will be searched.
dl - Additional dependencies, that will be returned along entity's dependencies.
Returns:
The set of entities, on that this entity depends (+ additional dependencies if any).

seekDependencies

public static EntitiesSet seekDependencies(AssemblyDescriptor entity,
                                           DependencyCalculator.SearchMode searchMode)
When cloning an entity, use this method to determine, which entities need also be cloned.

Parameters:
entity - The entity for which the dependencies will be searched.
Returns:
The set of entities, on that this entity depends.

seekDependencies

public static EntitiesSet seekDependencies(AssemblyDescriptor entity,
                                           EntitiesSet dl,
                                           DependencyCalculator.SearchMode searchMode)
When cloning an entity, use this method to determine, which entities need also be cloned.

Parameters:
entity - The entity for which the dependencies will be searched.
dl - Additional dependencies, that will be returned along entity's dependencies.
Returns:
The set of entities, on that this entity depends (+ additional dependencies if any).

seekDependencies

public static EntitiesSet seekDependencies(InterfaceType entity,
                                           DependencyCalculator.SearchMode searchMode)
When cloning an entity, use this method to determine, which entities need also be cloned.

Parameters:
entity - The entity for which the dependencies will be searched.
Returns:
The set of entities, on that this entity depends.

seekDependencies

public static EntitiesSet seekDependencies(InterfaceType entity,
                                           EntitiesSet dl,
                                           DependencyCalculator.SearchMode searchMode)
When cloning an entity, use this method to determine, which entities need also be cloned.

Parameters:
entity - The entity for which the dependencies will be searched.
dl - Additional dependencies, that will be returned along entity's dependencies.
Returns:
The set of entities, on that this entity depends (+ additional dependencies if any).

seekDependencies

public static EntitiesSet seekDependencies(DeploymentPlan entity,
                                           DependencyCalculator.SearchMode searchMode)
When cloning an entity, use this method to determine, which entities need also be cloned.

Parameters:
entity - The entity for which the dependencies will be searched.
Returns:
The set of entities, on that this entity depends.

seekDependencies

public static EntitiesSet seekDependencies(DeploymentPlan entity,
                                           EntitiesSet dl,
                                           DependencyCalculator.SearchMode searchMode)
When cloning an entity, use this method to determine, which entities need also be cloned.

Parameters:
entity - The entity for which the dependencies will be searched.
dl - Additional dependencies, that will be returned along entity's dependencies.
Returns:
The set of entities, on that this entity depends (+ additional dependencies if any).

seekDependencies

public static EntitiesSet seekDependencies(MicroComponent entity,
                                           DependencyCalculator.SearchMode searchMode)
When cloning an entity, use this method to determine, which entities need also be cloned.

Parameters:
entity - The entity for which the dependencies will be searched.
Returns:
The set of entities, on that this entity depends.

seekDependencies

public static EntitiesSet seekDependencies(MicroComponent entity,
                                           EntitiesSet dl,
                                           DependencyCalculator.SearchMode searchMode)
When cloning an entity, use this method to determine, which entities need also be cloned.

Parameters:
entity - The entity for which the dependencies will be searched.
dl - Additional dependencies, that will be returned along entity's dependencies.
Returns:
The set of entities, on that this entity depends (+ additional dependencies if any).

seekDependencies

public static EntitiesSet seekDependencies(MicroInterfaceType entity,
                                           DependencyCalculator.SearchMode searchMode)
When cloning an entity, use this method to determine, which entities need also be cloned.

Parameters:
entity - The entity for which the dependencies will be searched.
Returns:
The set of entities, on that this entity depends.

seekDependencies

public static EntitiesSet seekDependencies(MicroInterfaceType entity,
                                           EntitiesSet dl,
                                           DependencyCalculator.SearchMode searchMode)
When cloning an entity, use this method to determine, which entities need also be cloned.

Parameters:
entity - The entity for which the dependencies will be searched.
dl - Additional dependencies, that will be returned along entity's dependencies.
Returns:
The set of entities, on that this entity depends.