com.google.gwt.core.ext.linker

## Class SyntheticArtifact

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

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Artifact<?>>
  Direct Known Subclasses:
    SymbolMapsLinker.SourceMapArtifact

      public class SyntheticArtifact
      extends EmittedArtifact

  Artifacts created by `AbstractLinker`.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class com.google.gwt.core.ext.linker.EmittedArtifact

      `EmittedArtifact.Visibility`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SyntheticArtifact(java.lang.Class<? extends Linker> linkerType, java.lang.String partialPath, byte[] data)`
    `SyntheticArtifact(java.lang.Class<? extends Linker> linkerType, java.lang.String partialPath, byte[] data, long lastModified)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `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.
    `void` | `writeTo(TreeLogger logger, java.io.OutputStream out)` Provides access to the contents of the EmittedResource.

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

      `compareToComparableArtifact, getComparableArtifactType, getPartialPath, getVisibility, hashCode, setVisibility, toString`

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

      `compareTo, equals, getLinker, isTransferableFromShards`

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

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

- - ### Constructor Detail

    - #### SyntheticArtifact

          public SyntheticArtifact(java.lang.Class<? extends Linker> linkerType,
                                   java.lang.String partialPath,
                                   byte[] data)

    - #### SyntheticArtifact

          public SyntheticArtifact(java.lang.Class<? extends Linker> linkerType,
                                   java.lang.String partialPath,
                                   byte[] data,
                                   long lastModified)

  - ### Method Detail

    - #### getContents

          public java.io.InputStream getContents(TreeLogger logger)
                                          throws UnableToCompleteException

      Description copied from class: `EmittedArtifact`
      Provides access to the contents of the EmittedResource.
      Specified by:
        `getContents` in class `EmittedArtifact`
      Throws:
        `UnableToCompleteException`

    - #### getLastModified

          public long getLastModified()

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

      Overrides:
        `getLastModified` in class `EmittedArtifact`
      Returns:
        the time at which the Artifact was last modified

    - #### writeTo

          public void writeTo(TreeLogger logger,
                              java.io.OutputStream out)
                       throws UnableToCompleteException

      Description copied from class: `EmittedArtifact`
      Provides access to the contents of the EmittedResource.
      Overrides:
        `writeTo` in class `EmittedArtifact`
      Throws:
        `UnableToCompleteException`