public class BuildPackagePathToBuildFileManifestComputation extends Object implements GraphComputation<BuildPackagePathToBuildFileManifestKey,BuildFileManifest>
BuildFileManifest structure| Modifier and Type | Method and Description |
|---|---|
com.google.common.collect.ImmutableSet<? extends ComputeKey<? extends ComputeResult>> |
discoverDeps(BuildPackagePathToBuildFileManifestKey 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<? extends ComputeKey<? extends ComputeResult>> |
discoverPreliminaryDeps(BuildPackagePathToBuildFileManifestKey key)
Compute dependent keys required to compute given the current key.
|
ComputationIdentifier<BuildFileManifest> |
getIdentifier() |
static BuildPackagePathToBuildFileManifestComputation |
of(ProjectBuildFileParser parser,
Path buildFileName,
Path root,
boolean throwOnParseError)
Create new instance of
BuildPackagePathToBuildFileManifestComputation |
BuildFileManifest |
transform(BuildPackagePathToBuildFileManifestKey key,
ComputationEnvironment env)
Perform a transformation identified by key
Key into a final type Result. |
public static BuildPackagePathToBuildFileManifestComputation of(ProjectBuildFileParser parser, Path buildFileName, Path root, boolean throwOnParseError)
BuildPackagePathToBuildFileManifestComputationparser - Parser used to parse build file. This parser should be thread-safe.buildFileName - File name of the build file (like BUCK) expressed as a Pathroot - Absolute Path to the build root, usually cell rootthrowOnParseError - If true, error in parsing of a build file results in exception thrown.
Otherwise an empty BuildFileManifest is created and filled with error information.public ComputationIdentifier<BuildFileManifest> getIdentifier()
getIdentifier in interface GraphComputation<BuildPackagePathToBuildFileManifestKey,BuildFileManifest>ComputeKey.getIdentifier()public BuildFileManifest transform(BuildPackagePathToBuildFileManifestKey key, ComputationEnvironment env) throws Exception
GraphComputationKey into a final type Result. This
transformation should be performed synchronously.transform in interface GraphComputation<BuildPackagePathToBuildFileManifestKey,BuildFileManifest>key - The Key of the requested resultenv - The execution environment containing results of keys from GraphComputation.discoverDeps(ComputeKey, ComputationEnvironment) and GraphComputation.discoverPreliminaryDeps(ComputeKey)Exceptionpublic com.google.common.collect.ImmutableSet<? extends ComputeKey<? extends ComputeResult>> discoverDeps(BuildPackagePathToBuildFileManifestKey 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<BuildPackagePathToBuildFileManifestKey,BuildFileManifest>key - the current key to transformenv - The execution environment containing results of keys from GraphComputation.discoverPreliminaryDeps(ComputeKey)public com.google.common.collect.ImmutableSet<? extends ComputeKey<? extends ComputeResult>> discoverPreliminaryDeps(BuildPackagePathToBuildFileManifestKey key)
GraphComputationGraphComputation.discoverDeps(ComputeKey, ComputationEnvironment) as
a part of ComputationEnvironment, and GraphComputation.transform(ComputeKey,
ComputationEnvironment)discoverPreliminaryDeps in interface GraphComputation<BuildPackagePathToBuildFileManifestKey,BuildFileManifest>key - the current key to transformGraphComputation.discoverDeps(ComputeKey, ComputationEnvironment) and
GraphComputation.transform(ComputeKey, ComputationEnvironment) of the current key depends on