public class OutputLabel extends Object implements Comparable<OutputLabel>, AddsToRuleKey
A build target can return different outputs groups, with each output group potentially containing zero or more outputs. A target output label is used to refer to a particular output group in a target.
With providers, the output label maps to named output groups in DefaultInfo
. With the old action graph, each rule
should maintain an internal mapping of output labels to output groups.
A DEFAULT
output label is provided when the user has not specified a named output
label in a build target. For example, "//foo:bar" would be associated with the default output
label, whereas "//foo:bar[baz] would be associated with the named label "baz".
Modifier and Type | Class and Description |
---|---|
static class |
OutputLabel.Internals
Provides access to internal implementation details of OutputLabels.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(OutputLabel o) |
static OutputLabel |
defaultLabel()
Returns the output label for default outputs.
|
boolean |
equals(Object o) |
int |
hashCode() |
static OutputLabel.Internals |
internals() |
boolean |
isDefault() |
static OutputLabel |
of(String label)
Returns an output label wrapping the given String.
|
String |
toString() |
public static OutputLabel of(String label)
defaultLabel()
to get the
default empty output label.IllegalArgumentException
- if the given label
is an empty stringpublic static OutputLabel defaultLabel()
public boolean isDefault()
public int compareTo(OutputLabel o)
compareTo
in interface Comparable<OutputLabel>
public static OutputLabel.Internals internals()