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
Class GeneratorExt

    java.lang.Object
      com.google.gwt.core.ext.Generator
          com.google.gwt.core.ext.GeneratorExt

Direct Known Subclasses:
  GeneratorExtWrapper

    public abstract class GeneratorExt

extends Generator

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

Adds a new `generateIncrementally(com.google.gwt.core.ext.TreeLogger, com.google.gwt.core.ext.GeneratorContextExt, java.lang.String)` method.

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

Constructor Summary
`GeneratorExt()`

Method Summary
`java.lang.String` | `generate(TreeLogger logger, GeneratorContext context, java.lang.String typeName)` A default implementation of the abstract method defined in the base `Generator` class.
`abstract com.google.gwt.dev.javac.rebind.RebindResult` | `generateIncrementally(TreeLogger logger, GeneratorContextExt context, java.lang.String typeName)` Incrementally generate a default constructible subclass of the requested type.

Methods inherited from class com.google.gwt.core.ext.Generator
`escape`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### GeneratorExt

    public GeneratorExt()

Method Detail

### generate

    public java.lang.String generate(TreeLogger logger,
                                     GeneratorContext context,
                                     java.lang.String typeName)
                              throws UnableToCompleteException

  A default implementation of the abstract method defined in the base `Generator` class. This will wrap a call to `generateIncrementally(com.google.gwt.core.ext.TreeLogger, com.google.gwt.core.ext.GeneratorContextExt, java.lang.String)`, and attempt no caching. This supports backwards compatibility for applications or other generators which call this generator directly, as outside of the normal internal rebind process.

  It is recommended that `generateIncrementally(com.google.gwt.core.ext.TreeLogger, com.google.gwt.core.ext.GeneratorContextExt, java.lang.String)` be used instead.

  Specified by:
    `generate` in class `Generator`
  Returns:
    the name of a subclass to substitute for the requested class, or return `null` to cause the requested type itself to be used
  Throws:
    `UnableToCompleteException`

### generateIncrementally

    public abstract com.google.gwt.dev.javac.rebind.RebindResult generateIncrementally(TreeLogger logger,
                                                                                       GeneratorContextExt context,
                                                                                       java.lang.String typeName)
                                                                                throws UnableToCompleteException

  Incrementally generate a default constructible subclass of the requested type. The generator can use information from the context to determine whether it needs to regenerate everything, or whether it can selectively regenerate a subset of its output, or whether it can return quickly to allow reuse of all previously cached objects. It will return a `RebindResult`, which contains a `RebindStatus` field indicating whether to use previously cached artifacts, newly generated ones, or a partial mixture of both cached and newly generated objects.

  The result also includes a field for the name of the subclass to substitute for the requested class.

  The generator throws an `UnableToCompleteException` if for any reason it cannot complete successfully.

  Returns:
    a RebindResult
  Throws:
    `UnableToCompleteException`

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