public class RemoteInvocationServiceCallerGenerator extends AbstractIncrementalGenerator
incremental GWT-generator
for generating the
RemoteInvocationServiceCaller
and according service-client stubs.Constructor and Description |
---|
RemoteInvocationServiceCallerGenerator()
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.
|
protected String |
generateServiceClient(com.google.gwt.core.ext.typeinfo.JClassType serviceInterface,
String packageName,
com.google.gwt.core.ext.TreeLogger logger,
com.google.gwt.core.ext.GeneratorContext context)
This method generates a service-client implementation of a
RemoteInvocationService -interface
given by serviceInterface . |
private void |
generateServiceClientMethod(com.google.gwt.core.ext.typeinfo.JClassType serviceInterface,
com.google.gwt.user.rebind.SourceWriter sourceWriter,
com.google.gwt.core.ext.typeinfo.JMethod method)
This method generates the implementation of a method for a service-client.
|
long |
getVersionId() |
createClassName, generate, generateDefaultConstructor, generateIncrementally, generateSourceCloseBlock, generateSourcePublicConstructorDeclaration, generateSourcePublicMethodDeclaration, generateSourcePublicMethodDeclaration, isCachedResultObsolete
public RemoteInvocationServiceCallerGenerator()
public long getVersionId()
getVersionId
in class com.google.gwt.core.ext.IncrementalGenerator
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)
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)
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)
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 String generateServiceClient(com.google.gwt.core.ext.typeinfo.JClassType serviceInterface, String packageName, com.google.gwt.core.ext.TreeLogger logger, com.google.gwt.core.ext.GeneratorContext context)
RemoteInvocationService
-interface
given by serviceInterface
.serviceInterface
- is the RemoteInvocationService
-interface.packageName
- is the package name
.logger
- is the TreeLogger
.context
- is the GeneratorContext
.private void generateServiceClientMethod(com.google.gwt.core.ext.typeinfo.JClassType serviceInterface, com.google.gwt.user.rebind.SourceWriter sourceWriter, com.google.gwt.core.ext.typeinfo.JMethod method)
serviceInterface
- is the RemoteInvocationService
-interface.sourceWriter
- is the SourceWriter
.method
- is the JMethod
to generate.Copyright © 2001–2016 mmm-Team. All rights reserved.