Package 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
Modifier and TypeMethodDescriptionReturns all configuration properties defined in the module.Returns the name of the module's bootstrap function.long
Returns the time at which the module being compiled was last modified.Returns the name of the module being compiled.Returns all deferred binding properties defined in the module.boolean
Returnstrue
if the output should be as compact is possible andfalse
if the output should be human-readable.optimizeJavaScript
(TreeLogger logger, String jsProgram) Applies optimizations to a JavaScript program.
-
Method Details
-
getConfigurationProperties
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
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
String getModuleName()Returns the name of the module being compiled. -
getProperties
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()Returnstrue
if the output should be as compact is possible andfalse
if the output should be human-readable. -
optimizeJavaScript
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
-