public class ConfigurationBuildTargets extends Object
UnconfiguredBuildTarget
that represents a configuration
target to an instance of BuildTarget
.
We represent configuration targets as BuildTarget
(targets with a configuration) as
oppose to UnconfiguredBuildTarget
to keep target graph model consistent and in one place
(TargetGraph
uses BuildTarget
only).
This also allows us to avoid adding special handling for unconfigured targets in many other
places (for example, in places with generic graph analysis like in query
command).
Modifier and Type | Method and Description |
---|---|
static com.google.common.collect.ImmutableSet<BuildTarget> |
convert(com.google.common.collect.ImmutableSet<UnconfiguredBuildTarget> buildTargets)
Performs conversion similar to
convert(UnconfiguredBuildTarget) for a set of targets. |
static Optional<BuildTarget> |
convert(Optional<UnconfiguredBuildTarget> buildTarget)
Performs conversion similar to
convert(UnconfiguredBuildTarget) for an optional value. |
static BuildTarget |
convert(UnconfiguredBuildTarget buildTarget) |
static <T> com.google.common.collect.ImmutableMap<T,BuildTarget> |
convertValues(com.google.common.collect.ImmutableMap<T,UnconfiguredBuildTarget> map)
Applies conversion similar to
convert(UnconfiguredBuildTarget) to values in a map. |
static <T extends Comparable<T>> |
convertValues(com.google.common.collect.ImmutableSortedMap<T,UnconfiguredBuildTarget> map)
Applies conversion similar to
convert(UnconfiguredBuildTarget) to values in a map. |
public static BuildTarget convert(UnconfiguredBuildTarget buildTarget)
BuildTarget
that corresponds to a given UnconfiguredBuildTarget
.public static Optional<BuildTarget> convert(Optional<UnconfiguredBuildTarget> buildTarget)
convert(UnconfiguredBuildTarget)
for an optional value.public static com.google.common.collect.ImmutableSet<BuildTarget> convert(com.google.common.collect.ImmutableSet<UnconfiguredBuildTarget> buildTargets)
convert(UnconfiguredBuildTarget)
for a set of targets.public static <T> com.google.common.collect.ImmutableMap<T,BuildTarget> convertValues(com.google.common.collect.ImmutableMap<T,UnconfiguredBuildTarget> map)
convert(UnconfiguredBuildTarget)
to values in a map.public static <T extends Comparable<T>> com.google.common.collect.ImmutableSortedMap<T,BuildTarget> convertValues(com.google.common.collect.ImmutableSortedMap<T,UnconfiguredBuildTarget> map)
convert(UnconfiguredBuildTarget)
to values in a map.