Package com.google.gwt.core.ext.linker
Class Artifact<C extends Artifact<C>>
java.lang.Object
com.google.gwt.core.ext.linker.Artifact<C>
- Type Parameters:
C
- The type of Artifact interface that the Artifact can be compared to.
- All Implemented Interfaces:
Serializable
,Comparable<Artifact<?>>
- Direct Known Subclasses:
CompilationMetricsArtifact
,CompilationResult
,EmittedArtifact
,ModuleMetricsArtifact
,PrecompilationMetricsArtifact
,RpcLogArtifact
,RpcPolicyFileArtifact
,ScriptReference
,StylesheetReference
,SymbolMapsLinker.ScriptFragmentEditsArtifact
public abstract class Artifact<C extends Artifact<C>>
extends Object
implements Comparable<Artifact<?>>, Serializable
A base type for all artifacts relating to the link process. In order to
ensure stable output between runs of the compiler, Artifact types must
implement a stable comparison between instances of a relevant base type (the
exact comparison order is irrelevant).
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal int
protected abstract int
Performs comparison with an artifact of a compatible base type.final boolean
Delegates tocompareTo(Artifact)
.Returns the base type to use for comparisons between Artifacts.Returns the Linker that created the Artifact.abstract int
hashCode()
The class which is returned fromgetComparableArtifactType()
must declare a final implementation which returns the same hash code for objects for whichcompareToComparableArtifact(Artifact)
returns 0.final boolean
Returns whether theTransferable
annotation is present on this class.toString()
-
Constructor Details
-
Artifact
Constructor.- Parameters:
linker
- the type of Linker that instantiated the Artifact.
-
-
Method Details
-
compareTo
- Specified by:
compareTo
in interfaceComparable<C extends Artifact<C>>
-
equals
Delegates tocompareTo(Artifact)
. -
getLinker
Returns the Linker that created the Artifact. -
hashCode
public abstract int hashCode()The class which is returned fromgetComparableArtifactType()
must declare a final implementation which returns the same hash code for objects for whichcompareToComparableArtifact(Artifact)
returns 0. -
isTransferableFromShards
public final boolean isTransferableFromShards()Returns whether theTransferable
annotation is present on this class. SeeTransferable
for the implications. -
toString
-
compareToComparableArtifact
Performs comparison with an artifact of a compatible base type. Objects which compare to 0 are assumed equal, and must return the samehashCode()
. -
getComparableArtifactType
Returns the base type to use for comparisons between Artifacts. All concrete implementations of this methods must be final.
-