|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.gwt.core.ext.Generator com.google.gwt.core.ext.IncrementalGenerator
public abstract class IncrementalGenerator
An extension to the Generator
class which supports incremental
generation. It adds a generateIncrementally(com.google.gwt.core.ext.TreeLogger, com.google.gwt.core.ext.GeneratorContext, java.lang.String)
method.
Constructor Summary | |
---|---|
IncrementalGenerator()
|
Method Summary | |
---|---|
java.lang.String |
generate(TreeLogger logger,
GeneratorContext context,
java.lang.String typeName)
This method overrides Generator.generate(com.google.gwt.core.ext.TreeLogger, com.google.gwt.core.ext.GeneratorContext, java.lang.String) , and is included only for
backwards compatibility. |
abstract RebindResult |
generateIncrementally(TreeLogger logger,
GeneratorContext context,
java.lang.String typeName)
Incrementally generate a default constructible subclass of the requested type. |
static RebindResult |
generateNonIncrementally(TreeLogger logger,
Generator generator,
GeneratorContext context,
java.lang.String typeName)
A static helper method to wrap a non-incremental generator's result. |
abstract long |
getVersionId()
Returns a version id for an IncrementalGenerator. |
Methods inherited from class com.google.gwt.core.ext.Generator |
---|
escape, escapeClassName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IncrementalGenerator()
Method Detail |
---|
public static RebindResult generateNonIncrementally(TreeLogger logger, Generator generator, GeneratorContext context, java.lang.String typeName) throws UnableToCompleteException
Generator.generate(com.google.gwt.core.ext.TreeLogger, com.google.gwt.core.ext.GeneratorContext, java.lang.String)
method, and synthesizes a
RebindResult
instance to be returned.
logger
- A TreeLoggergenerator
- A non-incremental generatorcontext
- The generator contexttypeName
- The type for which a subclass will be generated
UnableToCompleteException
public final java.lang.String generate(TreeLogger logger, GeneratorContext context, java.lang.String typeName) throws UnableToCompleteException
Generator.generate(com.google.gwt.core.ext.TreeLogger, com.google.gwt.core.ext.GeneratorContext, java.lang.String)
, and is included only for
backwards compatibility. It wraps a call to generateIncrementally(com.google.gwt.core.ext.TreeLogger, com.google.gwt.core.ext.GeneratorContext, java.lang.String)
.
This method won't normally be called by the gwt rebind process, and it is
declared final and can't be overridden. It is provided in support of
existing applications and other generators which call this method directly,
outside of the gwt framework.
The passed in context is wrapped with an instance of
NonIncrementalGeneratorContext
, to ensure that no generator result
caching is attempted, since the cached result will be ignored by callers of
this method anyway.
generate
in class Generator
logger
- A TreeLoggercontext
- The generator contexttypeName
- The type for which a subclass will be generated
null
to cause the requested type itself to be
used
UnableToCompleteException
Generator.generate(com.google.gwt.core.ext.TreeLogger, com.google.gwt.core.ext.GeneratorContext, java.lang.String)
public abstract RebindResult generateIncrementally(TreeLogger logger, GeneratorContext context, java.lang.String typeName) throws UnableToCompleteException
It returns a RebindResult
, which contains a RebindMode
field, which indicates whether to use previously cached output, newly
generated output, or a partial mixture of both cached and newly generated
output.
The result also includes a field for the name of the subclass to substitute for the requested class. It may also contain extra client data added by specific generator implementations.
This method throws an UnableToCompleteException
if for any
reason it cannot complete successfully.
logger
- A TreeLoggercontext
- The generator contexttypeName
- The type for which a subclass will be generated
UnableToCompleteException
RebindResult
,
RebindMode
public abstract long getVersionId()
CachedGeneratorResult
's that were generated by a
different version of this generator. This is useful when new versions of a
generator are developed, which might alter the structure of generated
output, or alter semantics for cache reusability checking.
It is the responsibility of the developer to maintain this version id consistently.
|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |