public abstract class SourceArtifactImpl extends Object implements SourceArtifact, BoundArtifact
| Constructor and Description |
|---|
SourceArtifactImpl() |
| Modifier and Type | Method and Description |
|---|---|
BoundArtifact |
asBound() |
BuildArtifact |
asBuildArtifact() |
com.facebook.buck.core.artifact.DeclaredArtifact |
asDeclared() |
OutputArtifact |
asOutputArtifact() |
SkylarkOutputArtifactApi |
asSkylarkOutputArtifact(com.google.devtools.build.lib.events.Location location) |
SourceArtifact |
asSource() |
int |
compareTo(Artifact artifact) |
String |
getBasename() |
String |
getExtension() |
Object |
getOwner() |
Optional<com.google.devtools.build.lib.cmdline.Label> |
getOwnerTyped() |
String |
getShortPath() |
abstract PathSourcePath |
getSourcePath() |
boolean |
isBound() |
boolean |
isSource() |
static SourceArtifactImpl |
of(PathSourcePath sourcePath) |
void |
repr(com.google.devtools.build.lib.skylarkinterface.SkylarkPrinter printer) |
protected void |
requireBound() |
protected void |
requireDeclared() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasBound, asDeclaredgetOwner, isImmutableisHashabledebugPrint, strcompareTopublic final boolean isBound()
public abstract PathSourcePath getSourcePath()
getSourcePath in interface BoundArtifactgetSourcePath in interface SourceArtifact@Nullable public SourceArtifact asSource()
asSource in interface BoundArtifactSourceArtifact, null if this is not a SourceArtifact@Nullable public BuildArtifact asBuildArtifact()
asBuildArtifact in interface BoundArtifactBuildArtifact, null if this is not a BuildArtifact@Value.Lazy public String getBasename()
getBasename in interface SkylarkArtifactApi@Value.Lazy public String getExtension()
getExtension in interface SkylarkArtifactApi@Value.Lazy public Optional<com.google.devtools.build.lib.cmdline.Label> getOwnerTyped()
Optional.empty() if not
applicable. This is converted to a Skylark appropriate type by getOwner()@Value.Lazy public boolean isSource()
isSource in interface SkylarkArtifactApi@Value.Lazy public String getShortPath()
getShortPath in interface SkylarkArtifactApipublic void repr(com.google.devtools.build.lib.skylarkinterface.SkylarkPrinter printer)
repr in interface com.google.devtools.build.lib.skylarkinterface.SkylarkPrintablepublic SkylarkOutputArtifactApi asSkylarkOutputArtifact(com.google.devtools.build.lib.events.Location location) throws com.google.devtools.build.lib.syntax.EvalException
asSkylarkOutputArtifact in interface SkylarkArtifactApicom.google.devtools.build.lib.syntax.EvalExceptionpublic OutputArtifact asOutputArtifact()
asOutputArtifact in interface ArtifactOutputArtifact. Throws if cannot be convertedpublic static SourceArtifactImpl of(PathSourcePath sourcePath)
public final BoundArtifact asBound()
asBound in interface ArtifactBoundArtifactpublic final com.facebook.buck.core.artifact.DeclaredArtifact asDeclared()
asDeclared in interface ArtifactDeclaredArtifactprotected void requireBound()
protected void requireDeclared()
public final Object getOwner()
getOwner in interface SkylarkArtifactApipublic final int compareTo(Artifact artifact)
compareTo in interface Comparable<Artifact>