public class RecipeProcess
extends java.lang.Object
class DAG {
public static final RecipeArtifact A = new RecipeArtifact<>();
public static final RecipeArtifactD1 B = new RecipeArtifactD1<>(A);
public static final RecipeArtifactD1 C = new RecipeArtifactD1<>(A);
public static final RecipeArtifactD2 D = new RecipeArtifactD2<>(B, C);
}
Modifier and Type | Class and Description |
---|---|
static class |
RecipeProcess.GetArtifactMode
Operation modi for getting artifacts
|
static class |
RecipeProcess.SetArtifactMode
Operation modi for setting artifacts
|
Constructor and Description |
---|
RecipeProcess() |
Modifier and Type | Method and Description |
---|---|
<T> T |
computeArtifact(RecipeArtifact<T> key)
(Re-)compute artifact for the given key.
|
<T> T |
computeArtifact(RecipeArtifact<T> key,
boolean unsetResults)
(Re-)compute artifact for the given key.
|
<T> T |
getArtifact(RecipeArtifact<T> key)
Get with default mode - compute if necessary and unset results
|
<T> T |
getArtifact(RecipeArtifact<T> key,
RecipeProcess.GetArtifactMode mode)
Get the artifact for the given key.
|
<T> T |
getRecipe(RecipeArtifact<IEPTree> key) |
boolean |
hasArtifact(RecipeArtifact<?> key) |
<T> void |
setArtifact(RecipeArtifact<T> key,
T artifact)
Set with default mode - don't retrieve connected and unset results
|
<T> void |
setArtifact(RecipeArtifact<T> key,
T artifact,
RecipeProcess.SetArtifactMode mode)
Set the result artifact for the given key.
|
<F,T> void |
setRecipe(RecipeArtifactD1<T,F> key,
com.google.common.base.Function<F,T> fnc)
Set recipe with default behavior: unset artifacts
|
<F,T> void |
setRecipe(RecipeArtifactD1<T,F> key,
com.google.common.base.Function<F,T> fnc,
boolean unsetArtifact)
Set the recipe function for the given key Variant: key has one
dependency, the input for the recipe function
|
<F1,F2,T> void |
setRecipe(RecipeArtifactD2<T,F1,F2> key,
com.google.common.base.Function<org.apache.commons.lang3.tuple.Pair<F1,F2>,T> fnc)
Set recipe with default behavior: unset artifacts
|
<F1,F2,T> void |
setRecipe(RecipeArtifactD2<T,F1,F2> key,
com.google.common.base.Function<org.apache.commons.lang3.tuple.Pair<F1,F2>,T> fnc,
boolean unsetArtifact)
Set the recipe function for the given key Variant: key has two
dependencies, the input pair for the recipe function
|
void |
unsetArtifact(RecipeArtifact<?> key)
Unset the artifact and all depending artifacts for the given key.
|
public <F,T> void setRecipe(RecipeArtifactD1<T,F> key, com.google.common.base.Function<F,T> fnc)
key
- fnc
- public <F,T> void setRecipe(RecipeArtifactD1<T,F> key, com.google.common.base.Function<F,T> fnc, boolean unsetArtifact)
key
- fnc
- public <F1,F2,T> void setRecipe(RecipeArtifactD2<T,F1,F2> key, com.google.common.base.Function<org.apache.commons.lang3.tuple.Pair<F1,F2>,T> fnc)
key
- fnc
- public <F1,F2,T> void setRecipe(RecipeArtifactD2<T,F1,F2> key, com.google.common.base.Function<org.apache.commons.lang3.tuple.Pair<F1,F2>,T> fnc, boolean unsetArtifact)
key
- fnc
- public <T> T getRecipe(RecipeArtifact<IEPTree> key)
public <T> void setArtifact(RecipeArtifact<T> key, T artifact)
key
- public <T> void setArtifact(RecipeArtifact<T> key, T artifact, RecipeProcess.SetArtifactMode mode)
key
- artifact
- retrieveConnectedInputs
- unsetResults
- public void unsetArtifact(RecipeArtifact<?> key)
key
- public boolean hasArtifact(RecipeArtifact<?> key)
public <T> T getArtifact(RecipeArtifact<T> key)
key
- public <T> T getArtifact(RecipeArtifact<T> key, RecipeProcess.GetArtifactMode mode)
key
- computeIfAbsent
- unsetResultsIfComputed
- public <T> T computeArtifact(RecipeArtifact<T> key)
key
- unsetResults
- public <T> T computeArtifact(RecipeArtifact<T> key, boolean unsetResults)
key
- unsetResults
-