public abstract class DefaultBuildTargetSourcePath extends Object implements BuildTargetSourcePath
BuildTargetSourcePath which resolves to the default output of the BuildRule referred to by its target.| Constructor and Description |
|---|
DefaultBuildTargetSourcePath() |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(SourcePath other) |
boolean |
equals(Object other) |
abstract Optional<com.google.common.hash.HashCode> |
getPrecomputedHash()
In rare cases, a BuildTargetSourcePath may know a hash of its content on disk before it even
creates its output.
|
abstract BuildTargetWithOutputs |
getTargetWithOutputs() |
int |
hashCode() |
static DefaultBuildTargetSourcePath |
of(BuildTarget target)
Returns a default
BuildTargetSourcePath with an empty
output label. |
static DefaultBuildTargetSourcePath |
of(BuildTargetWithOutputs targetWithOutputs)
Construct a new immutable
DefaultBuildTargetSourcePath instance. |
static DefaultBuildTargetSourcePath |
of(BuildTargetWithOutputs targetWithOutputs,
Optional<? extends com.google.common.hash.HashCode> precomputedHash) |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetTarget, representationForRuleKeycompareClassespublic static DefaultBuildTargetSourcePath of(BuildTarget target)
BuildTargetSourcePath with an empty
output label.public static DefaultBuildTargetSourcePath of(BuildTargetWithOutputs targetWithOutputs)
DefaultBuildTargetSourcePath instance.targetWithOutputs - The value for the targetWithOutputs attributepublic static DefaultBuildTargetSourcePath of(BuildTargetWithOutputs targetWithOutputs, Optional<? extends com.google.common.hash.HashCode> precomputedHash)
public abstract BuildTargetWithOutputs getTargetWithOutputs()
getTargetWithOutputs in interface BuildTargetSourcePathBuildTargetWithOutputs this SourcePath is associated withpublic abstract Optional<com.google.common.hash.HashCode> getPrecomputedHash()
BuildTargetSourcePathgetPrecomputedHash in interface BuildTargetSourcePathpublic int compareTo(SourcePath other)
compareTo in interface Comparable<SourcePath>