com.google.gwt.core.ext

## Interface LinkerContext

-     public interface LinkerContext

  Provides access to data about the linking process. Methods that return a `SortedSet` are guaranteed to have stable iteration order between runs of the compiler over identical input. Unless otherwise specified, the exact iteration order is left as an implementation detail.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.SortedSet<ConfigurationProperty>` | `getConfigurationProperties()` Returns all configuration properties defined in the module.
    `java.lang.String` | `getModuleFunctionName()` Returns the name of the module's bootstrap function.
    `long` | `getModuleLastModified()` Returns the time at which the module being compiled was last modified.
    `java.lang.String` | `getModuleName()` Returns the name of the module being compiled.
    `java.util.SortedSet<SelectionProperty>` | `getProperties()` Returns all deferred binding properties defined in the module.
    `boolean` | `isOutputCompact()` Returns `true` if the output should be as compact is possible and `false` if the output should be human-readable.
    `java.lang.String` | `optimizeJavaScript(TreeLogger logger, java.lang.String jsProgram)` Applies optimizations to a JavaScript program.

- - ### Method Detail

    - #### getConfigurationProperties

          java.util.SortedSet<ConfigurationProperty> getConfigurationProperties()

      Returns all configuration properties defined in the module. Configuration properties do not have any impact on deferred-binding decisions, but may affect the behaviors of Generators and Linkers.

    - #### getModuleFunctionName

          java.lang.String getModuleFunctionName()

      Returns the name of the module's bootstrap function.

    - #### getModuleLastModified

          long getModuleLastModified()

      Returns the time at which the module being compiled was last modified. Can be used to set an appropriate timestamp on artifacts which depend solely on the module definition.

    - #### getModuleName

          java.lang.String getModuleName()

      Returns the name of the module being compiled.

    - #### getProperties

          java.util.SortedSet<SelectionProperty> getProperties()

      Returns all deferred binding properties defined in the module. The SelectionProperties will be sorted by the standard string comparison function on the name of the property.

    - #### isOutputCompact

          boolean isOutputCompact()

      Returns `true` if the output should be as compact is possible and `false` if the output should be human-readable.

    - #### optimizeJavaScript

          java.lang.String optimizeJavaScript(TreeLogger logger,
                                              java.lang.String jsProgram)
                                       throws UnableToCompleteException

      Applies optimizations to a JavaScript program. This method is intended to be applied to bootstrap scripts in order to apply context-specific transformations to the program, based on the compiler's configuration. The return value will be functionally-equivalent JavaScript, although the exact transformations and structure of the output should be considered opaque. While this function can be safely applied multiple times, the best results will be obtained by performing all JavaScript assembly and calling the function just before writing the selection script to disk.
      Throws:
        `UnableToCompleteException`