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.boolean
Check whether generator result caching is currently enabled.static GeneratorContext
newInstance
(GeneratorContext baseContext) Get a new instance wrapped from a baseGeneratorContext
implementation.boolean
tryReuseTypeFromCache
(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 baseGeneratorContext
implementation. -
getCachedGeneratorResult
Description copied from interface:GeneratorContext
Get 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:
getCachedGeneratorResult
in interfaceGeneratorContext
- Overrides:
getCachedGeneratorResult
in classDelegatingGeneratorContext
- Returns:
- A
CachedGeneratorResult
object, 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:GeneratorContext
Check whether generator result caching is currently enabled.- Specified by:
isGeneratorResultCachingEnabled
in interfaceGeneratorContext
- Overrides:
isGeneratorResultCachingEnabled
in classDelegatingGeneratorContext
-
tryReuseTypeFromCache
Description copied from interface:GeneratorContext
Mark 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:
tryReuseTypeFromCache
in interfaceGeneratorContext
- Overrides:
tryReuseTypeFromCache
in 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.
-