public class PojoDescriptorGenerator extends AbstractPojoDescriptorGenerator
incremental GWT generator to
generate implementations of PojoDescriptor for a particular POJO.| Modifier and Type | Class and Description |
|---|---|
protected static class |
PojoDescriptorGenerator.StatefulPropertyGenerator
This is a stateful class to
generate a
PojoPropertyDescriptor. |
| Constructor and Description |
|---|
PojoDescriptorGenerator()
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
createClassName(com.google.gwt.core.ext.typeinfo.JClassType inputType)
This method creates the
simple name of the Class to generate. |
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 |
generateConstructor(com.google.gwt.user.rebind.SourceWriter sourceWriter,
String simpleName,
com.google.gwt.core.ext.typeinfo.JClassType inputType,
PojoDescriptor<?> pojoDescriptor,
com.google.gwt.core.ext.GeneratorContext context)
Generates the constructor of the
Class to generate. |
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 |
generateMethodNewInstance(com.google.gwt.core.ext.typeinfo.JClassType inputType,
com.google.gwt.user.rebind.SourceWriter sourceWriter,
PojoDescriptor<?> pojoDescriptor)
Generates the method
PojoDescriptor.newInstance(). |
private static PojoDescriptor<?> |
getPojoDescriptor(com.google.gwt.core.ext.typeinfo.JClassType inputType)
This method determines the property descriptors of the
Pojo identified by
inputType. |
long |
getVersionId() |
createConfiguration, getConfigurationgenerate, generateDefaultConstructor, generateIncrementally, generateSourceCloseBlock, generateSourcePublicConstructorDeclaration, generateSourcePublicMethodDeclaration, generateSourcePublicMethodDeclaration, isCachedResultObsoleteprotected String createClassName(com.google.gwt.core.ext.typeinfo.JClassType inputType)
AbstractIncrementalGeneratorsimple name of the Class to generate. Typically
derived from JClassType.getName() of the given inputType with a static suffix or prefix that is
specific enough to avoid clashing with existing classes.createClassName in class AbstractIncrementalGeneratorinputType - is the JClassType reflecting the input-type that triggered the generation via
GWT.create(Class).simple name of the Class to generate.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)
AbstractIncrementalGeneratorClassSourceFileComposerFactory.addImport(String) to the given ClassSourceFileComposerFactory.generateImportStatements in class AbstractIncrementalGeneratorinputType - 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)
AbstractIncrementalGeneratorClassSourceFileComposerFactory.setSuperclass(String)ClassSourceFileComposerFactory.addImplementedInterface(String)ClassSourceFileComposerFactory.addAnnotationDeclaration(String)ClassSourceFileComposerFactory.makeInterface()ClassSourceFileComposerFactory.setJavaDocCommentForClass(String)ClassSourceFileComposerFactory. E.g.
sourceComposerFactory.addImplementedInterface(inputType.getQualifiedSourceName());
generateClassDeclaration in class AbstractIncrementalGeneratorinputType - 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)
AbstractIncrementalGeneratorClass to generate.generateClassContents in class AbstractIncrementalGeneratorinputType - 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 generateMethodNewInstance(com.google.gwt.core.ext.typeinfo.JClassType inputType,
com.google.gwt.user.rebind.SourceWriter sourceWriter,
PojoDescriptor<?> pojoDescriptor)
PojoDescriptor.newInstance().inputType - is the JClassType reflecting the input-type that triggered the generation via
GWT.create(Class).sourceWriter - is the SourceWriter where to write the source code
to.pojoDescriptor - is the PojoDescriptor.protected void generateConstructor(com.google.gwt.user.rebind.SourceWriter sourceWriter,
String simpleName,
com.google.gwt.core.ext.typeinfo.JClassType inputType,
PojoDescriptor<?> pojoDescriptor,
com.google.gwt.core.ext.GeneratorContext context)
Class to generate.sourceWriter - is the SourceWriter where to write the source code
to.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).pojoDescriptor - is the PojoDescriptor.context - is the GeneratorContext.private static PojoDescriptor<?> getPojoDescriptor(com.google.gwt.core.ext.typeinfo.JClassType inputType)
Pojo identified by
inputType.inputType - is the JClassType reflecting the input-type that triggered the generation via
GWT.create(Class).PojoDescriptor for the given inputType.public long getVersionId()
getVersionId in class com.google.gwt.core.ext.IncrementalGeneratorCopyright © 2001–2016 mmm-Team. All rights reserved.