public abstract class ExplicitBuildTargetSourcePath extends Object implements BuildTargetSourcePath
BuildTargetSourcePath which resolves to a specific (possibly non-default) output of the
BuildRule referred to by its target.| Constructor and Description |
|---|
ExplicitBuildTargetSourcePath() |
| 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 Path |
getResolvedPath() |
abstract BuildTargetWithOutputs |
getTargetWithOutputs() |
int |
hashCode() |
static ExplicitBuildTargetSourcePath |
of(BuildTarget target,
Path resolvedPath)
Construct a new immutable
ExplicitBuildTargetSourcePath instance. |
static ExplicitBuildTargetSourcePath |
of(BuildTargetWithOutputs target,
Path resolvedPath)
Construct a new immutable
ExplicitBuildTargetSourcePath instance. |
static ExplicitBuildTargetSourcePath |
of(BuildTargetWithOutputs targetWithOutputs,
Path resolvedPath,
Optional<? extends com.google.common.hash.HashCode> precomputedHash) |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetTarget, representationForRuleKeycompareClassespublic static ExplicitBuildTargetSourcePath of(BuildTarget target, Path resolvedPath)
ExplicitBuildTargetSourcePath instance.target - The value for the target attributeresolvedPath - The value for the resolvedPath attributepublic static ExplicitBuildTargetSourcePath of(BuildTargetWithOutputs target, Path resolvedPath)
ExplicitBuildTargetSourcePath instance.target - The BuildTargetWithOutputs associated with this SourcePathresolvedPath - The value for the resolvedPath attributetargetWithOutputspublic static ExplicitBuildTargetSourcePath of(BuildTargetWithOutputs targetWithOutputs, Path resolvedPath, Optional<? extends com.google.common.hash.HashCode> precomputedHash)
public abstract BuildTargetWithOutputs getTargetWithOutputs()
getTargetWithOutputs in interface BuildTargetSourcePathBuildTargetWithOutputs this SourcePath is associated withpublic abstract Path getResolvedPath()
public abstract Optional<com.google.common.hash.HashCode> getPrecomputedHash()
BuildTargetSourcePathgetPrecomputedHash in interface BuildTargetSourcePathpublic int compareTo(SourcePath other)
compareTo in interface Comparable<SourcePath>