Package com.google.gwt.core.ext.linker
Class CompilationResult
- java.lang.Object
-
- com.google.gwt.core.ext.linker.Artifact<CompilationResult>
-
- com.google.gwt.core.ext.linker.CompilationResult
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Artifact<?>>
- Direct Known Subclasses:
DelegatingCompilationResult
public abstract class CompilationResult extends Artifact<CompilationResult>
Represents a unique compilation of the module. Multiple permutations may result in identical JavaScript.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
CompilationResult(java.lang.Class<? extends Linker> linkerType)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected int
compareToComparableArtifact(CompilationResult o)
Performs comparison with an artifact of a compatible base type.protected java.lang.Class<CompilationResult>
getComparableArtifactType()
Returns the base type to use for comparisons between Artifacts.abstract java.lang.String[]
getJavaScript()
Returns the JavaScript compilation.abstract int
getPermutationId()
Returns the permutation ID.abstract java.util.SortedSet<java.util.SortedMap<SelectionProperty,java.lang.String>>
getPropertyMap()
Provides values forSelectionProperty
instances that are not explicitly set during the compilation phase.abstract SoftPermutation[]
getSoftPermutations()
Returns the permutations of the collapsed deferred-binding property values that are compiled into the CompilationResult.StatementRanges[]
getStatementRanges()
Returns the statement ranges for the JavaScript returned bygetJavaScript()
.abstract java.lang.String
getStrongName()
Return a string that uniquely identifies this compilation result.abstract SymbolData[]
getSymbolMap()
Returns a sorted array of obfuscated symbol names in the compilation to metadata about the symbol.int
hashCode()
The class which is returned fromArtifact.getComparableArtifactType()
must declare a final implementation which returns the same hash code for objects for whichArtifact.compareToComparableArtifact(Artifact)
returns 0.java.lang.String
toString()
-
Methods inherited from class com.google.gwt.core.ext.linker.Artifact
compareTo, equals, getLinker, isTransferableFromShards
-
-
-
-
Constructor Detail
-
CompilationResult
protected CompilationResult(java.lang.Class<? extends Linker> linkerType)
-
-
Method Detail
-
getJavaScript
public abstract java.lang.String[] getJavaScript()
Returns the JavaScript compilation. The first element of the array contains the code that should be run when the application starts up. The remaining elements are loaded viaGWT.runAsync
. SeeAsyncFragmentLoader
for details on the necessary linker support for runAsync.
-
getPermutationId
public abstract int getPermutationId()
Returns the permutation ID.
-
getPropertyMap
public abstract java.util.SortedSet<java.util.SortedMap<SelectionProperty,java.lang.String>> getPropertyMap()
Provides values forSelectionProperty
instances that are not explicitly set during the compilation phase. This method will return multiple mappings, one for each permutation that resulted in the compilation.
-
getSoftPermutations
public abstract SoftPermutation[] getSoftPermutations()
Returns the permutations of the collapsed deferred-binding property values that are compiled into the CompilationResult.
-
getStatementRanges
public StatementRanges[] getStatementRanges()
Returns the statement ranges for the JavaScript returned bygetJavaScript()
. Some subclasses returnnull
, in which case there is no statement range information available.
-
getStrongName
public abstract java.lang.String getStrongName()
Return a string that uniquely identifies this compilation result. Typically this is a cryptographic hash of the compiled data.
-
getSymbolMap
public abstract SymbolData[] getSymbolMap()
Returns a sorted array of obfuscated symbol names in the compilation to metadata about the symbol. This data can allow for on-the-fly deobfuscation of stack trace information or to allow server components to have in-depth knowledge of the runtime structure of compiled objects.
-
hashCode
public final int hashCode()
Description copied from class:Artifact
The class which is returned fromArtifact.getComparableArtifactType()
must declare a final implementation which returns the same hash code for objects for whichArtifact.compareToComparableArtifact(Artifact)
returns 0.- Specified by:
hashCode
in classArtifact<CompilationResult>
-
toString
public java.lang.String toString()
- Overrides:
toString
in classArtifact<CompilationResult>
-
compareToComparableArtifact
protected final int compareToComparableArtifact(CompilationResult 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 sameArtifact.hashCode()
.- Specified by:
compareToComparableArtifact
in classArtifact<CompilationResult>
-
getComparableArtifactType
protected final java.lang.Class<CompilationResult> 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 classArtifact<CompilationResult>
-
-