public interface BuildRuleResolver extends SourcePathRuleFinder
Modifier and Type | Method and Description |
---|---|
com.google.common.collect.ImmutableSortedSet<BuildRule> |
getAllRules(Iterable<BuildTarget> targets) |
BuildRule |
getRule(BuildTarget buildTarget)
Returns the
BuildRule associated with the buildTarget . |
Optional<BuildRule> |
getRuleOptional(BuildTarget buildTarget)
Returns the
BuildRule associated with the given BuildTarget if it is already
present. |
<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. |
filterBuildRuleInputs, filterBuildRuleInputs, filterBuildRuleInputs, filterBuildRuleInputs, getRule, getRule, getSourcePathResolver
Optional<BuildRule> getRuleOptional(BuildTarget buildTarget)
BuildRule
associated with the given BuildTarget
if it is already
present.<T> Optional<T> getRuleOptionalWithType(BuildTarget buildTarget, Class<T> cls)
BuildRule
associated with the given BuildTarget
if it is already
present, casting it to an expected type.HumanReadableException
- if the BuildRule
is not an instance of the given class.BuildRule getRule(BuildTarget buildTarget)
BuildRule
associated with the buildTarget
.HumanReadableException
- if no BuildRule is associated with the BuildTarget
.<T> T getRuleWithType(BuildTarget buildTarget, Class<T> cls)
BuildRule
associated with the buildTarget
, casting it to an
expected type.HumanReadableException
- if no rule is associated with the BuildTarget
, or if the
rule is not an instance of the given class.com.google.common.collect.ImmutableSortedSet<BuildRule> getAllRules(Iterable<BuildTarget> targets)