fnug.resource
Class Tarjan

java.lang.Object
  extended by fnug.resource.Tarjan

public class Tarjan
extends Object

Implementation of Tarjan's strongly connected components algorithm. Used for finding load order the dependent resources, and to discover cyclic dependencies.

Tarjan's_strongly_connected_components_algorithm

Author:
Martin Algesten

Constructor Summary
Tarjan(List<Resource> resources, boolean checkModified)
          Performs a tarjan's calculation of the given resources.
Tarjan(Resource... resources)
          Same as Tarjan(List, boolean), with checkModified set to false,but provided as array.
 
Method Summary
 List<Resource> getResult()
          Returns the result of the algorithm.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Tarjan

public Tarjan(List<Resource> resources,
              boolean checkModified)
Performs a tarjan's calculation of the given resources. These resources are exactly those configured in BundleConfig.files(), additional dependencies are discovered as part of this algorithm using Resource.findRequiresTags().

Parameters:
resources - starting resources.
checkModified -

Tarjan

public Tarjan(Resource... resources)
Same as Tarjan(List, boolean), with checkModified set to false,but provided as array. For testing.

Parameters:
resources - resources to start from.
Method Detail

getResult

public List<Resource> getResult()
Returns the result of the algorithm.

Returns:
result of the algorithm.


Copyright © 2012. All Rights Reserved.