Package com.google.gwt.core.ext.linker
Class EmittedArtifact
java.lang.Object
com.google.gwt.core.ext.linker.Artifact<EmittedArtifact>
com.google.gwt.core.ext.linker.EmittedArtifact
- All Implemented Interfaces:
Serializable,Comparable<Artifact<?>>
- Direct Known Subclasses:
BinaryEmittedArtifact,GeneratedResource,PublicResource,SyntheticArtifact
An artifact that will be emitted into the output. All EmittedArtifacts
contained in the
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?- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDescribes the visibility of an artifact. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEmittedArtifact(Class<? extends Linker> linker, String partialPath) -
Method Summary
Modifier and TypeMethodDescriptionprotected final intPerforms comparison with an artifact of a compatible base type.protected final Class<EmittedArtifact>Returns the base type to use for comparisons between Artifacts.abstract InputStreamgetContents(TreeLogger logger) Provides access to the contents of the EmittedResource.longReturns the time, measured in milliseconds from the epoch, at which the Artifact was last modified.final StringReturns the partial path within the output directory of the EmittedArtifact.final inthashCode()The class which is returned fromArtifact.getComparableArtifactType()must declare a final implementation which returns the same hash code for objects for whichArtifact.compareToComparableArtifact(Artifact)returns 0.voidsetVisibility(EmittedArtifact.Visibility visibility) toString()voidwriteTo(TreeLogger logger, OutputStream out) Provides access to the contents of the EmittedResource.Methods inherited from class com.google.gwt.core.ext.linker.Artifact
compareTo, equals, getLinker, isTransferableFromShards
-
Constructor Details
-
EmittedArtifact
-
-
Method Details
-
getContents
Provides access to the contents of the EmittedResource.- Throws:
UnableToCompleteException
-
getLastModified
public long getLastModified()Returns the time, measured in milliseconds from the epoch, at which the Artifact was last modified. This will be used to set the last-modified timestamp on the files written to disk.The default implementation always returns the current time. Subclasses should override this method to provide a type-appropriate value.
- Returns:
- the time at which the Artifact was last modified
-
getPartialPath
Returns the partial path within the output directory of the EmittedArtifact. -
getVisibility
- Returns:
- the visibility
-
hashCode
public final int hashCode()Description copied from class:ArtifactThe class which is returned fromArtifact.getComparableArtifactType()must declare a final implementation which returns the same hash code for objects for whichArtifact.compareToComparableArtifact(Artifact)returns 0.- Specified by:
hashCodein classArtifact<EmittedArtifact>
-
setVisibility
- Parameters:
visibility- the visibility to set
-
toString
- Overrides:
toStringin classArtifact<EmittedArtifact>
-
writeTo
Provides access to the contents of the EmittedResource.- Throws:
UnableToCompleteException
-
compareToComparableArtifact
Description copied from class:ArtifactPerforms comparison with an artifact of a compatible base type. Objects which compare to 0 are assumed equal, and must return the sameArtifact.hashCode().- Specified by:
compareToComparableArtifactin classArtifact<EmittedArtifact>
-
getComparableArtifactType
Description copied from class:ArtifactReturns the base type to use for comparisons between Artifacts. All concrete implementations of this methods must be final.- Specified by:
getComparableArtifactTypein classArtifact<EmittedArtifact>
-