public class BuildTargetPatternToBuildPackagePathComputation extends Object implements GraphComputation<BuildTargetPatternToBuildPackagePathKey,BuildPackagePaths>
This computation depends on FileTreeKey
(FileTreeComputation
) and DirectoryListKey
(DirectoryListComputation
).
See WatchmanBuildPackageComputation
for an equivalent computation which uses Watchman.
public static BuildTargetPatternToBuildPackagePathComputation of(String buildFileName, ProjectFilesystemView projectFilesystemView)
BuildTargetPatternToBuildPackagePathComputation
buildFileName
- Name of the build file to determine a package root folder, for example
'BUCK'public ComputationIdentifier<BuildPackagePaths> getIdentifier()
getIdentifier
in interface GraphComputation<BuildTargetPatternToBuildPackagePathKey,BuildPackagePaths>
ComputeKey.getIdentifier()
public BuildPackagePaths transform(BuildTargetPatternToBuildPackagePathKey key, ComputationEnvironment env)
GraphComputation
Key
into a final type Result
. This
transformation should be performed synchronously.transform
in interface GraphComputation<BuildTargetPatternToBuildPackagePathKey,BuildPackagePaths>
key
- The Key of the requested resultenv
- The execution environment containing results of keys from GraphComputation.discoverDeps(ComputeKey, ComputationEnvironment)
and GraphComputation.discoverPreliminaryDeps(ComputeKey)
public com.google.common.collect.ImmutableSet<? extends ComputeKey<? extends ComputeResult>> discoverDeps(BuildTargetPatternToBuildPackagePathKey key, ComputationEnvironment env)
GraphComputation
GraphComputation.discoverPreliminaryDeps(ComputeKey)
. The results of those computations will be
available in GraphComputation.transform(ComputeKey, ComputationEnvironment)
as a part of ComputationEnvironment
discoverDeps
in interface GraphComputation<BuildTargetPatternToBuildPackagePathKey,BuildPackagePaths>
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(BuildTargetPatternToBuildPackagePathKey key)
GraphComputation
GraphComputation.discoverDeps(ComputeKey, ComputationEnvironment)
as
a part of ComputationEnvironment
, and GraphComputation.transform(ComputeKey,
ComputationEnvironment)
discoverPreliminaryDeps
in interface GraphComputation<BuildTargetPatternToBuildPackagePathKey,BuildPackagePaths>
key
- the current key to transformGraphComputation.discoverDeps(ComputeKey, ComputationEnvironment)
and
GraphComputation.transform(ComputeKey, ComputationEnvironment)
of the current key depends on