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, wait
getTarget, representationForRuleKey
compareClasses
public 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 SourcePath
resolvedPath
- The value for the resolvedPath
attributetargetWithOutputs
public static ExplicitBuildTargetSourcePath of(BuildTargetWithOutputs targetWithOutputs, Path resolvedPath, Optional<? extends com.google.common.hash.HashCode> precomputedHash)
public abstract BuildTargetWithOutputs getTargetWithOutputs()
getTargetWithOutputs
in interface BuildTargetSourcePath
BuildTargetWithOutputs
this SourcePath
is associated withpublic abstract Path getResolvedPath()
public abstract Optional<com.google.common.hash.HashCode> getPrecomputedHash()
BuildTargetSourcePath
getPrecomputedHash
in interface BuildTargetSourcePath
public int compareTo(SourcePath other)
compareTo
in interface Comparable<SourcePath>