com.google.gwt.core.ext.linker

## Class ModuleMetricsArtifact

- java.lang.Object
- - com.google.gwt.core.ext.linker.Artifact<ModuleMetricsArtifact>
  - - com.google.gwt.core.ext.linker.ModuleMetricsArtifact

All Implemented Interfaces:
  java.io.Serializable, java.lang.Comparable<Artifact<?>>

    @Transferable
    public class ModuleMetricsArtifact
    extends Artifact<ModuleMetricsArtifact>

Captures some metrics from the module load and initial type oracle compile step.

See Also:
  Serialized Form

### Constructor Summary

Constructors
`` `ModuleMetricsArtifact()`
`protected` `ModuleMetricsArtifact(java.lang.Class<? extends Linker> linker, int instanceId)`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected int` `compareToComparableArtifact(ModuleMetricsArtifact o)` Performs comparison with an artifact of a compatible base type.
`protected java.lang.Class<ModuleMetricsArtifact>` `getComparableArtifactType()` Returns the base type to use for comparisons between Artifacts.
`long` `getElapsedMilliseconds()`
`java.lang.String[]` `getInitialTypes()`
`java.lang.String[]` `getSourceFiles()`
`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.
`ModuleMetricsArtifact` `setElapsedMilliseconds(long elapsedMilliseconds)`
`ModuleMetricsArtifact` `setInitialTypes(java.util.Collection<java.lang.String> initialTypes)`
`ModuleMetricsArtifact` `setSourceFiles(java.lang.String[] sourceFiles)`

### Methods inherited from class com.google.gwt.core.ext.linker.Artifact

`compareTo, equals, getLinker, isTransferableFromShards, toString`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### ModuleMetricsArtifact

    public ModuleMetricsArtifact()

#### ModuleMetricsArtifact

    protected ModuleMetricsArtifact(java.lang.Class<? extends Linker> linker,
                                    int instanceId)

### Method Detail

#### getElapsedMilliseconds

    public long getElapsedMilliseconds()

Returns:
  wall clock time elapsed since start of module load to end of the initial type oracle build.

#### getInitialTypes

    public java.lang.String[] getInitialTypes()

Returns:
  the number of types resulting from the type oracle build which compiles all of the source files initially presented to the compiler.

#### getSourceFiles

    public java.lang.String[] getSourceFiles()

Returns:
  the source files initially presented to the compiler

#### hashCode

    public int hashCode()

Description copied from class: `Artifact`
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.

Specified by:
  `hashCode` in class `Artifact<ModuleMetricsArtifact>`

#### setElapsedMilliseconds

    public ModuleMetricsArtifact setElapsedMilliseconds(long elapsedMilliseconds)

Parameters:
  `elapsedMilliseconds` - wall clock time elapsed since start of module load to end of the initial type oracle build.

#### setInitialTypes

    public ModuleMetricsArtifact setInitialTypes(java.util.Collection<java.lang.String> initialTypes)

Parameters:
  `initialTypes` - the number of types resulting from the initial type oracle build which compiles all of the source files initially presented to the compiler.

#### setSourceFiles

    public ModuleMetricsArtifact setSourceFiles(java.lang.String[] sourceFiles)

Parameters:
  `sourceFiles` - the list of source files presented to the compiler on the module source path.

#### compareToComparableArtifact

    protected int compareToComparableArtifact(ModuleMetricsArtifact o)

Description copied from class: `Artifact`
Performs comparison with an artifact of a compatible base type. Objects which compare to 0 are assumed equal, and must return the same `Artifact.hashCode()`.

Specified by:
  `compareToComparableArtifact` in class `Artifact<ModuleMetricsArtifact>`

#### getComparableArtifactType

    protected final java.lang.Class<ModuleMetricsArtifact> getComparableArtifactType()

Description copied from class: `Artifact`
Returns the base type to use for comparisons between Artifacts. All concrete implementations of this methods must be final.

Specified by:
  `getComparableArtifactType` in class `Artifact<ModuleMetricsArtifact>`