com.google.gwt.core.linker
Class IFrameLinker
java.lang.Object
com.google.gwt.core.ext.Linker
com.google.gwt.core.ext.linker.AbstractLinker
com.google.gwt.core.ext.linker.impl.SelectionScriptLinker
com.google.gwt.core.linker.IFrameLinker
@LinkerOrder(value=PRIMARY)
public class IFrameLinker
- extends com.google.gwt.core.ext.linker.impl.SelectionScriptLinker
Implements the canonical GWT bootstrap sequence that loads the GWT module in
a separate iframe.
Fields inherited from class com.google.gwt.core.ext.linker.impl.SelectionScriptLinker |
FRAGMENT_EXTENSION, FRAGMENT_SUBDIR |
Method Summary |
protected byte[] |
generatePrimaryFragment(TreeLogger logger,
LinkerContext context,
CompilationResult result,
java.lang.String[] js)
This implementation divides the code of the initial fragment into multiple
script tags. |
protected java.lang.String |
getCompilationExtension(TreeLogger logger,
LinkerContext context)
|
java.lang.String |
getDescription()
Returns a human-readable String describing the Linker. |
protected java.lang.String |
getFragmentSubdir()
Returns the subdirectory name to be used by getModulPrefix when requesting
a runAsync module. |
protected java.lang.String |
getModulePrefix(TreeLogger logger,
LinkerContext context,
java.lang.String strongName)
|
protected java.lang.String |
getModulePrefix(TreeLogger logger,
LinkerContext context,
java.lang.String strongName,
int numFragments)
|
protected java.lang.String |
getModuleSuffix(TreeLogger logger,
LinkerContext context)
|
protected java.lang.String |
getSelectionScriptTemplate(TreeLogger logger,
LinkerContext context)
|
ArtifactSet |
link(TreeLogger logger,
LinkerContext context,
ArtifactSet artifacts)
Invoke the Linker. |
protected java.lang.String |
modifyPrimaryJavaScript(java.lang.String js)
|
Methods inherited from class com.google.gwt.core.ext.linker.impl.SelectionScriptLinker |
doEmitCompilation, emitSelectionScript, generatePropertyProvider, generateScriptInjector, generateSelectionScript, generateStylesheetInjector, getCompilationStrongName, isRelativeURL, replaceAll |
Methods inherited from class com.google.gwt.core.ext.Linker |
relink |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IFrameLinker
public IFrameLinker()
getDescription
public java.lang.String getDescription()
- Description copied from class:
Linker
- Returns a human-readable String describing the Linker.
- Specified by:
getDescription
in class Linker
link
public ArtifactSet link(TreeLogger logger,
LinkerContext context,
ArtifactSet artifacts)
throws UnableToCompleteException
- Description copied from class:
Linker
- Invoke the Linker.
- Overrides:
link
in class com.google.gwt.core.ext.linker.impl.SelectionScriptLinker
- Parameters:
logger
- the TreeLogger to record tocontext
- provides access to the Linker's environmentartifacts
- an unmodifiable view of the artifacts to link
- Returns:
- the artifacts that should be propagated through the linker chain
- Throws:
UnableToCompleteException
- if compilation violates assumptions made
by the Linker or for errors encountered by the Linker
generatePrimaryFragment
protected byte[] generatePrimaryFragment(TreeLogger logger,
LinkerContext context,
CompilationResult result,
java.lang.String[] js)
throws UnableToCompleteException
- This implementation divides the code of the initial fragment into multiple
script tags. These chunked script tags loads faster on Firefox even when
the data is cached. Additionally, having the script tags separated means
that the early ones can be evaluated before the later ones have finished
downloading. As a result of this parallelism, the overall time to get the
JavaScript downloaded and evaluated can lower.
- Overrides:
generatePrimaryFragment
in class com.google.gwt.core.ext.linker.impl.SelectionScriptLinker
- Throws:
UnableToCompleteException
getCompilationExtension
protected java.lang.String getCompilationExtension(TreeLogger logger,
LinkerContext context)
- Specified by:
getCompilationExtension
in class com.google.gwt.core.ext.linker.impl.SelectionScriptLinker
getFragmentSubdir
protected java.lang.String getFragmentSubdir()
- Returns the subdirectory name to be used by getModulPrefix when requesting
a runAsync module. The default implementation returns the value of
FRAGMENT_SUDBIR. This has been factored out for test cases.
getModulePrefix
protected java.lang.String getModulePrefix(TreeLogger logger,
LinkerContext context,
java.lang.String strongName)
- Specified by:
getModulePrefix
in class com.google.gwt.core.ext.linker.impl.SelectionScriptLinker
getModulePrefix
protected java.lang.String getModulePrefix(TreeLogger logger,
LinkerContext context,
java.lang.String strongName,
int numFragments)
- Overrides:
getModulePrefix
in class com.google.gwt.core.ext.linker.impl.SelectionScriptLinker
getModuleSuffix
protected java.lang.String getModuleSuffix(TreeLogger logger,
LinkerContext context)
- Specified by:
getModuleSuffix
in class com.google.gwt.core.ext.linker.impl.SelectionScriptLinker
getSelectionScriptTemplate
protected java.lang.String getSelectionScriptTemplate(TreeLogger logger,
LinkerContext context)
- Specified by:
getSelectionScriptTemplate
in class com.google.gwt.core.ext.linker.impl.SelectionScriptLinker
modifyPrimaryJavaScript
protected java.lang.String modifyPrimaryJavaScript(java.lang.String js)