public abstract class EmittedArtifact extends Artifact<EmittedArtifact>
ArtifactSet at the end of the Linking process will
be emitted by the compiler into the module's output directory. This type may
be extended by Linker providers to provide alternative implementations of
getContents(TreeLogger).
TODO(bobv): provide a timestamp so we can make the time on output files match
that of input files?| Modifier and Type | Class and Description |
|---|---|
static class |
EmittedArtifact.Visibility
Describes the visibility of an artifact.
|
| Modifier | Constructor and Description |
|---|---|
protected |
EmittedArtifact(java.lang.Class<? extends Linker> linker,
java.lang.String partialPath) |
| Modifier and Type | Method and Description |
|---|---|
protected int |
compareToComparableArtifact(EmittedArtifact o)
Performs comparison with an artifact of a compatible base type.
|
protected java.lang.Class<EmittedArtifact> |
getComparableArtifactType()
Returns the base type to use for comparisons between Artifacts.
|
abstract java.io.InputStream |
getContents(TreeLogger logger)
Provides access to the contents of the EmittedResource.
|
long |
getLastModified()
Returns the time, measured in milliseconds from the epoch, at which the
Artifact was last modified.
|
java.lang.String |
getPartialPath()
Returns the partial path within the output directory of the
EmittedArtifact.
|
EmittedArtifact.Visibility |
getVisibility() |
int |
hashCode()
The class which is returned from
Artifact.getComparableArtifactType() must
declare a final implementation which returns the same hash code for objects
for which Artifact.compareToComparableArtifact(Artifact) returns 0. |
void |
setVisibility(EmittedArtifact.Visibility visibility) |
java.lang.String |
toString() |
void |
writeTo(TreeLogger logger,
java.io.OutputStream out)
Provides access to the contents of the EmittedResource.
|
compareTo, equals, getLinker, isTransferableFromShardsprotected EmittedArtifact(java.lang.Class<? extends Linker> linker, java.lang.String partialPath)
public abstract java.io.InputStream getContents(TreeLogger logger) throws UnableToCompleteException
UnableToCompleteExceptionpublic long getLastModified()
The default implementation always returns the current time. Subclasses should override this method to provide a type-appropriate value.
public final java.lang.String getPartialPath()
public EmittedArtifact.Visibility getVisibility()
public final int hashCode()
ArtifactArtifact.getComparableArtifactType() must
declare a final implementation which returns the same hash code for objects
for which Artifact.compareToComparableArtifact(Artifact) returns 0.hashCode in class Artifact<EmittedArtifact>public void setVisibility(EmittedArtifact.Visibility visibility)
visibility - the visibility to setpublic java.lang.String toString()
toString in class Artifact<EmittedArtifact>public void writeTo(TreeLogger logger, java.io.OutputStream out) throws UnableToCompleteException
UnableToCompleteExceptionprotected final int compareToComparableArtifact(EmittedArtifact o)
ArtifactArtifact.hashCode().compareToComparableArtifact in class Artifact<EmittedArtifact>protected final java.lang.Class<EmittedArtifact> getComparableArtifactType()
ArtifactgetComparableArtifactType in class Artifact<EmittedArtifact>