public class NullRebuildCache extends MinimalRebuildCache
immediateTypeRelations
Constructor and Description |
---|
NullRebuildCache() |
Modifier and Type | Method and Description |
---|---|
void |
addGeneratedArtifacts(ArtifactSet generatedArtifacts)
Accumulates generated artifacts so that they can be output on recompiles even if no generators
are run.
|
void |
addModifiedCompilationUnitNames(TreeLogger logger,
Set<String> modifiedCompilationUnitNames) |
void |
addSourceCompilationUnitName(String sourceCompilationUnitName) |
void |
addTypeReference(String fromTypeName,
String toTypeName) |
void |
associateReboundTypeWithGeneratedCompilationUnitName(String reboundTypeName,
String generatedTypeName) |
void |
associateReboundTypeWithInputResource(String reboundTypeName,
String inputResourcePath)
Record that a Generator that was ran as a result of a GWT.create(ReboundType.class) call read a
particular resource.
|
void |
clearPerTypeJsCache() |
void |
clearRebinderTypeAssociations(String rebinderTypeName) |
void |
clearReboundTypeAssociations(String reboundTypeName) |
Set<String> |
computeAndClearStaleTypesCache(TreeLogger logger,
JTypeOracle typeOracle)
Calculates the set of stale types and clears their cached Js, StatementRanges and SourceMaps.
|
Set<String> |
computeDeletedTypeNames()
Computes and returns the set of names of deleted types.
|
Set<String> |
computeModifiedTypeNames()
Computes and returns the set of names of modified types.
|
Set<String> |
computeReachableTypeNames()
Computes and returns the names of the set of types that are transitively referenceable starting
from the set of root types.
|
ArtifactSet |
getGeneratedArtifacts() |
String |
getJs(String typeName) |
Set<String> |
getModifiedCompilationUnitNames() |
JsPersistentPrettyNamer.PersistentPrettyNamerState |
getPersistentPrettyNamerState() |
Set<String> |
getPreambleTypeNames() |
JsSourceMap |
getSourceMap(String typeName) |
Set<String> |
getStaleTypeNames() |
StatementRanges |
getStatementRanges(String typeName) |
ResolveRuntimeTypeReferences.IntTypeMapper |
getTypeMapper() |
boolean |
hasJs(String typeName) |
boolean |
hasPreambleTypeNames() |
boolean |
isSourceCompilationUnit(String compilationUnitName) |
void |
recordBuildResources(ModuleDef module)
Records the resource paths and modification dates of build resources in the current compile and
builds a list of known modified resource paths by comparing the resource paths and modification
dates of build resources in the previous compile with those of the current compile.
|
void |
recordDiskSourceResources(Map<String,Long> currentModifiedByDiskSourcePath)
Records the paths and modification dates of source resources in the current compile and builds
a list of known modified paths by comparing the paths and modification dates of source
resources in the previous compile with those of the current compile.
|
void |
recordDiskSourceResources(ModuleDef module)
Records the paths and modification dates of source resources in the current compile and builds
a list of known modified paths by comparing the paths and modification dates of source
resources in the previous compile with those of the current compile.
|
void |
recordGeneratedUnits(Collection<GeneratedUnit> generatedUnits)
Records the paths and content ids of generated source resources in the current compile and
updates a list of known modified paths by comparing the paths and content ids of generated
source resources in the previous compile with those of the current compile.
|
void |
recordNestedTypeName(String compilationUnitTypeName,
String nestedTypeName) |
void |
recordNestedTypeNamesPerType(CompilationUnit compilationUnit) |
void |
recordRebinderTypeForReboundType(String reboundTypeName,
String rebinderType)
Records that rebinder type Foo contains a GWT.create(ReboundTypeBar.class) call.
|
void |
removeReferencesFrom(String fromTypeName) |
void |
setJsForType(TreeLogger logger,
String typeName,
String typeJs) |
void |
setJsoTypeNames(Set<String> jsoTypeNames,
Set<String> singleJsoImplInterfaceNames,
Set<String> dualJsoImplInterfaceNames)
Records the names of JSO subtypes, single impl interfaces and dual impl interfaces as well as
keeps track of types that entered or left one of the lists in the most recent iteration.
|
void |
setPreambleTypeNames(TreeLogger logger,
Set<String> preambleTypeNames) |
void |
setRootTypeNames(Collection<String> rootTypeNames) |
void |
setSourceMapForType(String typeName,
JsSourceMap sourceMap) |
void |
setStatementRangesForType(String typeName,
StatementRanges statementRanges) |
copyFrom, filterUnreachableTypeNames, getImmediateTypeRelations, getLastLinkedJsBytes, getProcessedStaleTypeNames, isPopulated, knowsLastLinkedJsBytes, markSourceFileStale, setLastLinkedJsBytes, setProcessedStaleTypeNames
public void addGeneratedArtifacts(ArtifactSet generatedArtifacts)
MinimalRebuildCache
addGeneratedArtifacts
in class MinimalRebuildCache
public void addModifiedCompilationUnitNames(TreeLogger logger, Set<String> modifiedCompilationUnitNames)
addModifiedCompilationUnitNames
in class MinimalRebuildCache
public void addSourceCompilationUnitName(String sourceCompilationUnitName)
addSourceCompilationUnitName
in class MinimalRebuildCache
public void addTypeReference(String fromTypeName, String toTypeName)
addTypeReference
in class MinimalRebuildCache
public void associateReboundTypeWithGeneratedCompilationUnitName(String reboundTypeName, String generatedTypeName)
associateReboundTypeWithGeneratedCompilationUnitName
in class MinimalRebuildCache
public void associateReboundTypeWithInputResource(String reboundTypeName, String inputResourcePath)
MinimalRebuildCache
associateReboundTypeWithInputResource
in class MinimalRebuildCache
public void clearPerTypeJsCache()
clearPerTypeJsCache
in class MinimalRebuildCache
public void clearRebinderTypeAssociations(String rebinderTypeName)
clearRebinderTypeAssociations
in class MinimalRebuildCache
public void clearReboundTypeAssociations(String reboundTypeName)
clearReboundTypeAssociations
in class MinimalRebuildCache
public Set<String> computeAndClearStaleTypesCache(TreeLogger logger, JTypeOracle typeOracle)
MinimalRebuildCache
The calculation of stale types starts with the list of known modified types and expands that set using various patterns intended to find any types whose output JS would be affected by the changes in the modified types. For example if the parent of class Foo was changed then the castmaps in all children of Foo need to be recreated.
In some ways this process is similar to that performed by the CompilationUnitInvalidator but it differs both in what type of cached objects are being cleared (JS versus CompilationUnits) and in what invalidation rules must be applied. CompilationUnitInvalidator is concerned only with changes in interface while the invalidation here must also look at JSO promotion/demotion and cast references because of the peculiarities of output JS format.
computeAndClearStaleTypesCache
in class MinimalRebuildCache
public Set<String> computeDeletedTypeNames()
MinimalRebuildCache
Deleted types are all those types that are nested within compilation units that are known to have been deleted.
computeDeletedTypeNames
in class MinimalRebuildCache
public Set<String> computeModifiedTypeNames()
MinimalRebuildCache
Modified types are all those types that are nested within compilation units that are known to have been modified.
computeModifiedTypeNames
in class MinimalRebuildCache
public Set<String> computeReachableTypeNames()
MinimalRebuildCache
Should only be called once per compile, so that the "lastReachableTypeNames" list accurately reflects the reachable types of the immediately previous compile.
computeReachableTypeNames
in class MinimalRebuildCache
public ArtifactSet getGeneratedArtifacts()
getGeneratedArtifacts
in class MinimalRebuildCache
public ResolveRuntimeTypeReferences.IntTypeMapper getTypeMapper()
getTypeMapper
in class MinimalRebuildCache
public String getJs(String typeName)
getJs
in class MinimalRebuildCache
public Set<String> getModifiedCompilationUnitNames()
getModifiedCompilationUnitNames
in class MinimalRebuildCache
public JsPersistentPrettyNamer.PersistentPrettyNamerState getPersistentPrettyNamerState()
getPersistentPrettyNamerState
in class MinimalRebuildCache
public Set<String> getPreambleTypeNames()
getPreambleTypeNames
in class MinimalRebuildCache
public JsSourceMap getSourceMap(String typeName)
getSourceMap
in class MinimalRebuildCache
public Set<String> getStaleTypeNames()
getStaleTypeNames
in class MinimalRebuildCache
public StatementRanges getStatementRanges(String typeName)
getStatementRanges
in class MinimalRebuildCache
public boolean hasJs(String typeName)
hasJs
in class MinimalRebuildCache
public boolean hasPreambleTypeNames()
hasPreambleTypeNames
in class MinimalRebuildCache
public boolean isSourceCompilationUnit(String compilationUnitName)
isSourceCompilationUnit
in class MinimalRebuildCache
public void recordBuildResources(ModuleDef module)
MinimalRebuildCache
recordBuildResources
in class MinimalRebuildCache
public void recordDiskSourceResources(Map<String,Long> currentModifiedByDiskSourcePath)
MinimalRebuildCache
recordDiskSourceResources
in class MinimalRebuildCache
public void recordDiskSourceResources(ModuleDef module)
MinimalRebuildCache
recordDiskSourceResources
in class MinimalRebuildCache
public void recordGeneratedUnits(Collection<GeneratedUnit> generatedUnits)
MinimalRebuildCache
recordGeneratedUnits
in class MinimalRebuildCache
public void recordNestedTypeName(String compilationUnitTypeName, String nestedTypeName)
recordNestedTypeName
in class MinimalRebuildCache
public void recordNestedTypeNamesPerType(CompilationUnit compilationUnit)
recordNestedTypeNamesPerType
in class MinimalRebuildCache
public void recordRebinderTypeForReboundType(String reboundTypeName, String rebinderType)
MinimalRebuildCache
recordRebinderTypeForReboundType
in class MinimalRebuildCache
public void removeReferencesFrom(String fromTypeName)
removeReferencesFrom
in class MinimalRebuildCache
public void setJsForType(TreeLogger logger, String typeName, String typeJs)
setJsForType
in class MinimalRebuildCache
public void setJsoTypeNames(Set<String> jsoTypeNames, Set<String> singleJsoImplInterfaceNames, Set<String> dualJsoImplInterfaceNames)
MinimalRebuildCache
setJsoTypeNames
in class MinimalRebuildCache
public void setPreambleTypeNames(TreeLogger logger, Set<String> preambleTypeNames)
setPreambleTypeNames
in class MinimalRebuildCache
public void setRootTypeNames(Collection<String> rootTypeNames)
setRootTypeNames
in class MinimalRebuildCache
public void setSourceMapForType(String typeName, JsSourceMap sourceMap)
setSourceMapForType
in class MinimalRebuildCache
public void setStatementRangesForType(String typeName, StatementRanges statementRanges)
setStatementRangesForType
in class MinimalRebuildCache
Copyright © 2018. All rights reserved.