JTools

org.jtools.depend
Enum DependencyResolution

java.lang.Object
  extended by java.lang.Enum<DependencyResolution>
      extended by org.jtools.depend.DependencyResolution
All Implemented Interfaces:
Serializable, Comparable<DependencyResolution>

public enum DependencyResolution
extends Enum<DependencyResolution>

Enumerates predefined DependencyAlgorithm's.

Author:
Rainer Noack
See Also:
Dependencies.setAlgorithm(DependencyResolution)

Enum Constant Summary
AS_EARLY_AS_POSSIBLE
          Resolves Dependencies in forward manier.
AS_LATE_AS_POSSIBLE
          Resolves Dependencies in backward manier.
 
Method Summary
 DependencyAlgorithm getAlgorithm()
           
static DependencyResolution valueOf(String name)
          Returns the enum constant of this type with the specified name.
static DependencyResolution[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

AS_EARLY_AS_POSSIBLE

public static final DependencyResolution AS_EARLY_AS_POSSIBLE
Resolves Dependencies in forward manier. Given a list L that contains all N targets T[0]...T[N-1] sorted with respect to their natural order.
  1. Run through L from 0 to N-1, for each T[n]:
  2. Get a list L' that contains all targets T'[m] on which T[n] depends.
  3. If m&gt;n: move the target at position m to position n (T[n] is now position T[n+1]) and continue with 2. for the new T[n].


AS_LATE_AS_POSSIBLE

public static final DependencyResolution AS_LATE_AS_POSSIBLE
Resolves Dependencies in backward manier. Given a list L that contains all N targets T[0]...T[N-1] sorted with respect to their natural order.
  1. Run through L from N-1 to 0, for each T[n]:
  2. Get a list L' that contains all targets T'[m] that are affected by T[n].
  3. If m&lt;n: move the target at position m to position n (T[n] is now position T[n-1]) and continue with 2. for the new T[n].

Method Detail

values

public static final DependencyResolution[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(DependencyResolution c : DependencyResolution.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static DependencyResolution valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name

getAlgorithm

public DependencyAlgorithm getAlgorithm()

JTools

© 2000-2006, JTools.org.