public class PojoDescriptorBuilderGenerator extends AbstractPojoDescriptorGenerator
incremental GWT generator
to
generate the implementation of PojoDescriptorBuilder
.Constructor and Description |
---|
PojoDescriptorBuilderGenerator()
The constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
generateClassContents(com.google.gwt.core.ext.typeinfo.JClassType inputType,
com.google.gwt.core.ext.TreeLogger logger,
com.google.gwt.user.rebind.SourceWriter sourceWriter,
String simpleName,
com.google.gwt.core.ext.GeneratorContext context)
This method generates the actual contents of the
Class to generate. |
protected void |
generateClassDeclaration(com.google.gwt.core.ext.typeinfo.JClassType inputType,
com.google.gwt.core.ext.TreeLogger logger,
com.google.gwt.user.rebind.ClassSourceFileComposerFactory sourceComposerFactory,
com.google.gwt.core.ext.GeneratorContext context)
This method generates the additional things for the class declaration.
|
protected void |
generateImportStatements(com.google.gwt.core.ext.typeinfo.JClassType inputType,
com.google.gwt.core.ext.TreeLogger logger,
com.google.gwt.user.rebind.ClassSourceFileComposerFactory sourceComposerFactory,
com.google.gwt.core.ext.GeneratorContext context)
This method generates the import statements.
|
private void |
generateMethodCreateDescriptor(com.google.gwt.user.rebind.SourceWriter sourceWriter,
com.google.gwt.core.ext.TreeLogger logger,
String simpleName,
com.google.gwt.core.ext.typeinfo.JClassType inputType,
com.google.gwt.core.ext.GeneratorContext context)
Generates the method
AbstractPojoDescriptorBuilderLimited.createDescriptor(Class) . |
long |
getVersionId() |
protected boolean |
isCachedResultObsolete(com.google.gwt.core.ext.CachedGeneratorResult cachedGeneratorResult,
String typeName)
This method determines whether a
CachedGeneratorResult is obsolete or can be reused. |
createConfiguration, getConfiguration
createClassName, generate, generateDefaultConstructor, generateIncrementally, generateSourceCloseBlock, generateSourcePublicConstructorDeclaration, generateSourcePublicMethodDeclaration, generateSourcePublicMethodDeclaration
public PojoDescriptorBuilderGenerator()
protected boolean isCachedResultObsolete(com.google.gwt.core.ext.CachedGeneratorResult cachedGeneratorResult, String typeName)
AbstractIncrementalGenerator
CachedGeneratorResult
is obsolete or can be reused.isCachedResultObsolete
in class AbstractIncrementalGenerator
cachedGeneratorResult
- is the CachedGeneratorResult
.typeName
- is the full-qualified name of the Class
to generate.true
if the CachedGeneratorResult
is obsolete and has to be re-generated, false
otherwise (if it can be reused).protected void generateImportStatements(com.google.gwt.core.ext.typeinfo.JClassType inputType, com.google.gwt.core.ext.TreeLogger logger, com.google.gwt.user.rebind.ClassSourceFileComposerFactory sourceComposerFactory, com.google.gwt.core.ext.GeneratorContext context)
AbstractIncrementalGenerator
ClassSourceFileComposerFactory.addImport(String)
to the given ClassSourceFileComposerFactory
.generateImportStatements
in class AbstractIncrementalGenerator
inputType
- is the JClassType
reflecting the input-type that triggered the generation via
GWT.create(Class)
.logger
- is the TreeLogger
.sourceComposerFactory
- is the ClassSourceFileComposerFactory
.context
- is the GeneratorContext
.protected void generateClassDeclaration(com.google.gwt.core.ext.typeinfo.JClassType inputType, com.google.gwt.core.ext.TreeLogger logger, com.google.gwt.user.rebind.ClassSourceFileComposerFactory sourceComposerFactory, com.google.gwt.core.ext.GeneratorContext context)
AbstractIncrementalGenerator
ClassSourceFileComposerFactory.setSuperclass(String)
ClassSourceFileComposerFactory.addImplementedInterface(String)
ClassSourceFileComposerFactory.addAnnotationDeclaration(String)
ClassSourceFileComposerFactory.makeInterface()
ClassSourceFileComposerFactory.setJavaDocCommentForClass(String)
ClassSourceFileComposerFactory
. E.g.
sourceComposerFactory.addImplementedInterface(inputType.getQualifiedSourceName());
generateClassDeclaration
in class AbstractIncrementalGenerator
inputType
- is the JClassType
reflecting the input-type that triggered the generation via
GWT.create(Class)
.logger
- is the TreeLogger
.sourceComposerFactory
- is the ClassSourceFileComposerFactory
.context
- is the GeneratorContext
.protected void generateClassContents(com.google.gwt.core.ext.typeinfo.JClassType inputType, com.google.gwt.core.ext.TreeLogger logger, com.google.gwt.user.rebind.SourceWriter sourceWriter, String simpleName, com.google.gwt.core.ext.GeneratorContext context)
AbstractIncrementalGenerator
Class
to generate.generateClassContents
in class AbstractIncrementalGenerator
inputType
- is the JClassType
reflecting the input-type that triggered the generation via
GWT.create(Class)
.logger
- is the TreeLogger
.sourceWriter
- is the SourceWriter
where to write
the source code
to.simpleName
- is the simple name
of the Class
to generate.context
- is the GeneratorContext
.private void generateMethodCreateDescriptor(com.google.gwt.user.rebind.SourceWriter sourceWriter, com.google.gwt.core.ext.TreeLogger logger, String simpleName, com.google.gwt.core.ext.typeinfo.JClassType inputType, com.google.gwt.core.ext.GeneratorContext context)
AbstractPojoDescriptorBuilderLimited.createDescriptor(Class)
.sourceWriter
- is the SourceWriter
where to write
the source code
to.logger
- is the TreeLogger
.simpleName
- is the simple name
of the Class
to generate.inputType
- is the JClassType
reflecting the input-type that triggered the generation via
GWT.create(Class)
.context
- is the GeneratorContext
.public long getVersionId()
getVersionId
in class com.google.gwt.core.ext.IncrementalGenerator
Copyright © 2001–2016 mmm-Team. All rights reserved.