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 baseGeneratorContextinstance but with generator result caching disabled.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CachedGeneratorResultgetCachedGeneratorResult()Get the cached rebind result that has been provided to the context, if available.booleanisGeneratorResultCachingEnabled()Check whether generator result caching is currently enabled.static GeneratorContextnewInstance(GeneratorContext baseContext)Get a new instance wrapped from a baseGeneratorContextimplementation.booleantryReuseTypeFromCache(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 baseGeneratorContextimplementation.
-
getCachedGeneratorResult
public CachedGeneratorResult 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
public boolean tryReuseTypeFromCache(java.lang.String typeName)
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.
-
-