Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| GWT 2.4.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.gwt.core.ext
Interface GeneratorContextExt

All Superinterfaces:
  GeneratorContext

All Known Implementing Classes:
  GeneratorContextExtWrapper

    public interface GeneratorContextExt

extends GeneratorContext

EXPERIMENTAL and subject to change. Do not use this in production code.

An extension to GeneratorContext which includes access to previously cached rebind results.

TODO(jbrosenberg): Merge this into `GeneratorContext` directly, once the api has stabilized and we can remove the "experimental" moniker.

Method Summary
`com.google.gwt.dev.javac.rebind.CachedRebindResult` | `getCachedGeneratorResult()` Get cached result from a previous run of the current generator, if available.
`boolean` | `isGeneratorResultCachingEnabled()` Check whether generator result caching is currently enabled.
`boolean` | `isProdMode()` Returns true if generators are being run to produce code for a production compile.
`boolean` | `reuseTypeFromCacheIfAvailable(java.lang.String typeName)` Mark a type to be reused from the generator result cache.

Methods inherited from interface com.google.gwt.core.ext.GeneratorContext
`checkRebindRuleAvailable, commit, commitArtifact, commitResource, getPropertyOracle, getResourcesOracle, getTypeOracle, tryCreate, tryCreateResource`

Method Detail

### getCachedGeneratorResult

    com.google.gwt.dev.javac.rebind.CachedRebindResult getCachedGeneratorResult()

  Get cached result from a previous run of the current generator, if available.

  Returns:
    A `CachedRebindResult` object, if one has been provided to the context. Null is returned if there is no previous result, or if generator result caching is not enabled.

### isGeneratorResultCachingEnabled

    boolean isGeneratorResultCachingEnabled()

  Check whether generator result caching is currently enabled.

### isProdMode

    boolean isProdMode()

  Returns true if generators are being run to produce code for a production compile. Returns false for dev mode. Generators can use this information to produce code optimized for the target.

### reuseTypeFromCacheIfAvailable

    boolean reuseTypeFromCacheIfAvailable(java.lang.String typeName)

  Mark a type to be reused from the generator result cache. 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 from `GeneratorExt.generateIncrementally(com.google.gwt.core.ext.TreeLogger, com.google.gwt.core.ext.GeneratorContextExt, java.lang.String)`, with a result containing `RebindStatus.USE_PARTIAL_CACHED`.

  Parameters:
    `typeName` - the fully qualified name of a type.
  Returns:
    true if the requested type is available from the generator result cache, false otherwise.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| GWT 2.4.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD