Package com.google.gwt.core.ext
Class NonIncrementalGeneratorContext
java.lang.Object
com.google.gwt.core.ext.DelegatingGeneratorContext
com.google.gwt.core.ext.NonIncrementalGeneratorContext
- All Implemented Interfaces:
GeneratorContext
A wrapper to access a base
GeneratorContext instance but with
generator result caching disabled.-
Method Summary
Modifier and TypeMethodDescriptionGet the cached rebind result that has been provided to the context, if available.booleanCheck whether generator result caching is currently enabled.static GeneratorContextnewInstance(GeneratorContext baseContext) Get a new instance wrapped from a baseGeneratorContextimplementation.booleantryReuseTypeFromCache(String typeName) Mark a type to be reused from the generator result cache, if available.Methods inherited from class com.google.gwt.core.ext.DelegatingGeneratorContext
checkRebindRuleAvailable, commit, commitArtifact, commitResource, getPropertyOracle, getResourcesOracle, getTypeOracle, isProdMode, tryCreate, tryCreateResource
-
Method Details
-
newInstance
Get a new instance wrapped from a baseGeneratorContextimplementation. -
getCachedGeneratorResult
Description copied from interface:GeneratorContextGet the cached rebind result that has been provided to the context, if available. The provided result will be the most recent previously generated result for the currently active rebind rule and requested type name.- Specified by:
getCachedGeneratorResultin interfaceGeneratorContext- Overrides:
getCachedGeneratorResultin classDelegatingGeneratorContext- Returns:
- A
CachedGeneratorResultobject, if one has been provided to the context. Null is returned if there is no previous result available.
-
isGeneratorResultCachingEnabled
public boolean isGeneratorResultCachingEnabled()Description copied from interface:GeneratorContextCheck whether generator result caching is currently enabled.- Specified by:
isGeneratorResultCachingEnabledin interfaceGeneratorContext- Overrides:
isGeneratorResultCachingEnabledin classDelegatingGeneratorContext
-
tryReuseTypeFromCache
Description copied from interface:GeneratorContextMark a type to be reused from the generator result cache, if available. Calling this method with a successful response indicates that the calling generator will not re-generate this type. A cached version of this type will be added to the context once the calling generator returns fromIncrementalGenerator.generateIncrementally(com.google.gwt.core.ext.TreeLogger, com.google.gwt.core.ext.GeneratorContext, java.lang.String), with a result containingRebindMode.USE_PARTIAL_CACHED.- Specified by:
tryReuseTypeFromCachein interfaceGeneratorContext- Overrides:
tryReuseTypeFromCachein classDelegatingGeneratorContext- Parameters:
typeName- the fully qualified source name of a type.- Returns:
- true if the requested type is available from the generator result cache, false otherwise.
-