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
public class NonIncrementalGeneratorContext extends DelegatingGeneratorContext
A wrapper to access a baseGeneratorContext
instance but with generator result caching disabled.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CachedGeneratorResult
getCachedGeneratorResult()
Get the cached rebind result that has been provided to the context, if available.boolean
isGeneratorResultCachingEnabled()
Check whether generator result caching is currently enabled.static GeneratorContext
newInstance(GeneratorContext baseContext)
Get a new instance wrapped from a baseGeneratorContext
implementation.boolean
tryReuseTypeFromCache(java.lang.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 Detail
-
newInstance
public static GeneratorContext newInstance(GeneratorContext baseContext)
Get a new instance wrapped from a baseGeneratorContext
implementation.
-
getCachedGeneratorResult
public CachedGeneratorResult 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
public boolean tryReuseTypeFromCache(java.lang.String typeName)
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.
-
-