public class RuleAnalysisComputation extends Object implements GraphComputation<RuleAnalysisKey,RuleAnalysisResult>
GraphComputation for performing the target graph to provider and action graph
transformation.
This represents the stage of Buck where the TargetGraph is transformed into the Provider graph, along with the registered Actions.
| Constructor and Description |
|---|
RuleAnalysisComputation(TargetGraph targetGraph,
BuckEventBus eventBus) |
| Modifier and Type | Method and Description |
|---|---|
com.google.common.collect.ImmutableSet<RuleAnalysisKey> |
discoverDeps(RuleAnalysisKey key,
ComputationEnvironment env)
Compute dependent keys required to compute given key, and a set of dependencies as listed by
GraphComputation.discoverPreliminaryDeps(ComputeKey). |
com.google.common.collect.ImmutableSet<RuleAnalysisKey> |
discoverPreliminaryDeps(RuleAnalysisKey key)
Compute dependent keys required to compute given the current key.
|
ComputationIdentifier<RuleAnalysisResult> |
getIdentifier() |
RuleAnalysisResult |
transform(RuleAnalysisKey key,
ComputationEnvironment env)
Perform a transformation identified by key
Key into a final type Result. |
public RuleAnalysisComputation(TargetGraph targetGraph, BuckEventBus eventBus)
public ComputationIdentifier<RuleAnalysisResult> getIdentifier()
getIdentifier in interface GraphComputation<RuleAnalysisKey,RuleAnalysisResult>ComputeKey.getIdentifier()public RuleAnalysisResult transform(RuleAnalysisKey key, ComputationEnvironment env) throws ActionCreationException, RuleAnalysisException
GraphComputationKey into a final type Result. This
transformation should be performed synchronously.transform in interface GraphComputation<RuleAnalysisKey,RuleAnalysisResult>key - The Key of the requested resultenv - The execution environment containing results of keys from GraphComputation.discoverDeps(ComputeKey, ComputationEnvironment) and GraphComputation.discoverPreliminaryDeps(ComputeKey)ActionCreationExceptionRuleAnalysisExceptionpublic com.google.common.collect.ImmutableSet<RuleAnalysisKey> discoverPreliminaryDeps(RuleAnalysisKey key)
GraphComputationGraphComputation.discoverDeps(ComputeKey, ComputationEnvironment) as
a part of ComputationEnvironment, and GraphComputation.transform(ComputeKey,
ComputationEnvironment)discoverPreliminaryDeps in interface GraphComputation<RuleAnalysisKey,RuleAnalysisResult>key - the current key to transformGraphComputation.discoverDeps(ComputeKey, ComputationEnvironment) and
GraphComputation.transform(ComputeKey, ComputationEnvironment) of the current key depends onpublic com.google.common.collect.ImmutableSet<RuleAnalysisKey> discoverDeps(RuleAnalysisKey key, ComputationEnvironment env)
GraphComputationGraphComputation.discoverPreliminaryDeps(ComputeKey). The results of those computations will be
available in GraphComputation.transform(ComputeKey, ComputationEnvironment) as a part of ComputationEnvironmentdiscoverDeps in interface GraphComputation<RuleAnalysisKey,RuleAnalysisResult>key - the current key to transformenv - The execution environment containing results of keys from GraphComputation.discoverPreliminaryDeps(ComputeKey)