@ThreadSafe public class BuildTarget extends Object implements Comparable<BuildTarget>, DependencyStack.Element
Modifier and Type | Method and Description |
---|---|
BuildTarget |
assertUnflavored()
Verifies that this build target has no flavors.
|
int |
compareTo(BuildTarget that) |
boolean |
equals(Object o) |
BaseName |
getBaseName() |
CanonicalCellName |
getCell() |
CellRelativePath |
getCellRelativeBasePath() |
String |
getCellRelativeName()
If this build target is cell//third_party/java/guava:guava-latest, then this would return
"//third_party/java/guava:guava-latest".
|
String |
getFlavorPostfix()
An empty string when there are no flavors, or hash followed by comma-separated flavors.
|
FlavorSet |
getFlavors() |
protected String |
getFlavorsAsString() |
String |
getFullyQualifiedName()
If this build target is cell//third_party/java/guava:guava-latest, then this would return
"cell//third_party/java/guava:guava-latest".
|
String |
getShortName() |
String |
getShortNameAndFlavorPostfix()
If this build target were cell//third_party/java/guava:guava-latest, then this would return
"guava-latest".
|
TargetConfiguration |
getTargetConfiguration() |
UnconfiguredBuildTarget |
getUnconfiguredBuildTarget() |
UnflavoredBuildTarget |
getUnflavoredBuildTarget() |
int |
hashCode() |
boolean |
isFlavored() |
String |
toString() |
String |
toStringWithConfiguration()
Target name and configuration.
|
BuildTarget |
withAppendedFlavors(Flavor... flavors) |
BuildTarget |
withAppendedFlavors(Set<Flavor> flavors) |
BuildTarget |
withFlavors(Flavor... flavors) |
BuildTarget |
withFlavors(Iterable<? extends Flavor> flavors) |
BuildTarget |
withoutFlavors()
A copy of this build target but without any flavors.
|
BuildTarget |
withoutFlavors(Flavor... flavors) |
BuildTarget |
withoutFlavors(Set<Flavor> flavors) |
BuildTarget |
withShortName(String shortName) |
BuildTarget |
withUnflavoredBuildTarget(UnflavoredBuildTarget target)
Keep flavors and configuration, replace everything else.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getElement
public UnconfiguredBuildTarget getUnconfiguredBuildTarget()
public UnflavoredBuildTarget getUnflavoredBuildTarget()
public FlavorSet getFlavors()
public TargetConfiguration getTargetConfiguration()
public CanonicalCellName getCell()
public BaseName getBaseName()
public CellRelativePath getCellRelativeBasePath()
public String getShortName()
public String getShortNameAndFlavorPostfix()
public String getFlavorPostfix()
protected String getFlavorsAsString()
public String getFullyQualifiedName()
public String getCellRelativeName()
public boolean isFlavored()
public String toString()
toString
in class Object
getFullyQualifiedName()
public String toStringWithConfiguration()
public BuildTarget withShortName(String shortName)
public BuildTarget assertUnflavored()
IllegalStateException
- if a build target has flavorspublic BuildTarget withoutFlavors(Set<Flavor> flavors)
public BuildTarget withoutFlavors(Flavor... flavors)
public BuildTarget withoutFlavors()
public BuildTarget withFlavors(Flavor... flavors)
public BuildTarget withFlavors(Iterable<? extends Flavor> flavors)
public BuildTarget withAppendedFlavors(Set<Flavor> flavors)
public BuildTarget withAppendedFlavors(Flavor... flavors)
public BuildTarget withUnflavoredBuildTarget(UnflavoredBuildTarget target)
public int compareTo(BuildTarget that)
compareTo
in interface Comparable<BuildTarget>