public abstract class AbstractBuildRuleResolver extends Object implements BuildRuleResolver
Modifier | Constructor and Description |
---|---|
protected |
AbstractBuildRuleResolver() |
Modifier and Type | Method and Description |
---|---|
com.google.common.collect.ImmutableSet<BuildRule> |
filterBuildRuleInputs(Iterable<? extends SourcePath> sources) |
java.util.stream.Stream<BuildRule> |
filterBuildRuleInputs(Optional<SourcePath> sourcePath) |
com.google.common.collect.ImmutableSet<BuildRule> |
filterBuildRuleInputs(SourcePath... sources) |
java.util.stream.Stream<BuildRule> |
filterBuildRuleInputs(java.util.stream.Stream<SourcePath> sources) |
com.google.common.collect.ImmutableSortedSet<BuildRule> |
getAllRules(Iterable<BuildTarget> targets) |
BuildRule |
getRule(BuildTarget buildTarget)
Returns the
BuildRule associated with the buildTarget . |
BuildRule |
getRule(BuildTargetSourcePath sourcePath) |
Optional<BuildRule> |
getRule(SourcePath sourcePath) |
<T> Optional<T> |
getRuleOptionalWithType(BuildTarget buildTarget,
Class<T> cls)
Returns the
BuildRule associated with the given BuildTarget if it is already
present, casting it to an expected type. |
<T> T |
getRuleWithType(BuildTarget buildTarget,
Class<T> cls)
Returns the
BuildRule associated with the buildTarget , casting it to an
expected type. |
SourcePathResolverAdapter |
getSourcePathResolver() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRuleOptional
public <T> Optional<T> getRuleOptionalWithType(BuildTarget buildTarget, Class<T> cls)
BuildRuleResolver
BuildRule
associated with the given BuildTarget
if it is already
present, casting it to an expected type.getRuleOptionalWithType
in interface BuildRuleResolver
public BuildRule getRule(BuildTarget buildTarget)
BuildRuleResolver
BuildRule
associated with the buildTarget
.getRule
in interface BuildRuleResolver
public <T> T getRuleWithType(BuildTarget buildTarget, Class<T> cls)
BuildRuleResolver
BuildRule
associated with the buildTarget
, casting it to an
expected type.getRuleWithType
in interface BuildRuleResolver
public com.google.common.collect.ImmutableSortedSet<BuildRule> getAllRules(Iterable<BuildTarget> targets)
getAllRules
in interface BuildRuleResolver
public com.google.common.collect.ImmutableSet<BuildRule> filterBuildRuleInputs(Iterable<? extends SourcePath> sources)
filterBuildRuleInputs
in interface SourcePathRuleFinder
public com.google.common.collect.ImmutableSet<BuildRule> filterBuildRuleInputs(SourcePath... sources)
filterBuildRuleInputs
in interface SourcePathRuleFinder
public java.util.stream.Stream<BuildRule> filterBuildRuleInputs(java.util.stream.Stream<SourcePath> sources)
filterBuildRuleInputs
in interface SourcePathRuleFinder
public java.util.stream.Stream<BuildRule> filterBuildRuleInputs(Optional<SourcePath> sourcePath)
filterBuildRuleInputs
in interface SourcePathRuleFinder
public Optional<BuildRule> getRule(SourcePath sourcePath)
getRule
in interface SourcePathRuleFinder
Optional
containing the BuildRule
whose output sourcePath
refers to, or absent
if sourcePath
doesn't refer to the output of a BuildRule
.public BuildRule getRule(BuildTargetSourcePath sourcePath)
getRule
in interface SourcePathRuleFinder
BuildRule
whose output sourcePath
refers to its output.public SourcePathResolverAdapter getSourcePathResolver()
getSourcePathResolver
in interface SourcePathRuleFinder