@@ -0,0 +1,2220 @@
+/**%0A * Copyright (C) 2009 - present by OpenGamma Inc. and the OpenGamma group of companies%0A * %0A * Please see distribution for license.%0A */%0Apackage com.opengamma.engine.depgraph;%0A%0Aimport com.opengamma.engine.value.ValueRequirement;%0Aimport com.opengamma.util.ArgumentChecker;%0A%0A/**%0A * Unit of task resolution. A resolve task executes to convert a %7B@link ValueRequirement%7D into a dependency node.%0A */%0A/* package */class ResolveTask %7B%0A%0A  public static enum State %7B%0A    /**%0A     * Task has just been created, is runnable and will resolve the computation target ready to enter the RESOLVED state.%0A     */%0A    PENDING,%0A    /**%0A     * Task has been resolved, is runnable and will either query the function resolver for functions to enter the FUNCTIONS%0A     * state (or FAILED), or be satisfied by the output of a node already in the graph and enter the COMPLETE state.%0A     */%0A    RESOLVED,%0A    /**%0A     * Task has a sequence of functions to attempt, is runnable and will enter the BLOCKED, FAILED or COMPLETE state depending%0A     * on whether there are functions left to try or completion has occurred.%0A     */%0A    FUNCTIONS,%0A    /**%0A     * Task is not runnable and waiting for completion or failure of another.%0A     */%0A    BLOCKED,%0A    /**%0A     * The value requirement cannot be satisfied. This task is complete and not runnable.%0A     */%0A    FAILED,%0A    /**%0A     * The value requirement can be satisfied and a %7B@link DependencyNode%7D is available. The task is complete and not runnable.%0A     */%0A    COMPLETE%0A  %7D;%0A%0A  /**%0A   * Value requirement to resolve.%0A   */%0A  private final ValueRequirement _valueRequirement;%0A%0A  /**%0A   * Current state.%0A   */%0A  private State _state;%0A%0A  public ResolveTask(final ValueRequirement valueRequirement) %7B%0A    ArgumentChecker.notNull(valueRequirement, %22valueRequirement%22);%0A    _valueRequirement = valueRequirement;%0A    setState(State.PENDING);%0A  %7D%0A%0A  private State getState() %7B%0A    return _state;%0A  %7D%0A%0A  private void setState(final State state) %7B%0A    _state = state;%0A  %7D%0A%0A  public ValueRequirement getValueRequirement() %7B%0A    return _valueRequirement;%0A  %7D%0A%0A  @Override%0A  public String toString() %7B%0A    return getClass().getSimpleName() + %22%5B%22 + getValueRequirement() + %22 %22 + getState() + %22%5D%22;%0A  %7D%0A%0A%7D%0A

Work in progress.