public class NlsBundleFactoryGenerator extends AbstractIncrementalGenerator
Generator
for generation of the true
NlsBundleFactory
implementation as well as according NlsBundle
implementations.Constructor and Description |
---|
NlsBundleFactoryGenerator()
The constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
generateBlockBundleCreation(com.google.gwt.user.rebind.SourceWriter sourceWriter,
com.google.gwt.core.ext.TreeLogger logger,
com.google.gwt.core.ext.GeneratorContext context)
Generates the block that creates the
NlsBundle instance lazily via GWT.create(Class) . |
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.
|
protected void |
generateMethodCreateBundle(com.google.gwt.user.rebind.SourceWriter sourceWriter,
com.google.gwt.core.ext.TreeLogger logger,
com.google.gwt.core.ext.GeneratorContext context)
Generates the
createBundle method. |
long |
getVersionId() |
createClassName, generate, generateDefaultConstructor, generateIncrementally, generateSourceCloseBlock, generateSourcePublicConstructorDeclaration, generateSourcePublicMethodDeclaration, generateSourcePublicMethodDeclaration, isCachedResultObsolete
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
.protected void generateMethodCreateBundle(com.google.gwt.user.rebind.SourceWriter sourceWriter, com.google.gwt.core.ext.TreeLogger logger, com.google.gwt.core.ext.GeneratorContext context)
createBundle
method.sourceWriter
- is the SourceWriter
.logger
- is the TreeLogger
.context
- is the GeneratorContext
.protected void generateBlockBundleCreation(com.google.gwt.user.rebind.SourceWriter sourceWriter, com.google.gwt.core.ext.TreeLogger logger, com.google.gwt.core.ext.GeneratorContext context)
NlsBundle
instance lazily via GWT.create(Class)
.sourceWriter
- is the SourceWriter
.logger
- is the TreeLogger
.context
- is the GeneratorContext
.public long getVersionId()
getVersionId
in class com.google.gwt.core.ext.IncrementalGenerator
Copyright © 2001–2016 mmm-Team. All rights reserved.