public class ClientProxyGenerator
extends com.google.gwt.core.ext.Generator
ClientProxy
implementing a custom Java interface, extending the
marker ClientProxy
interface, and annotated with Restlet annotations
such as Get
, Post
, Put
or Delete
.Constructor and Description |
---|
ClientProxyGenerator()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
generate(com.google.gwt.core.ext.TreeLogger logger,
com.google.gwt.core.ext.GeneratorContext context,
java.lang.String typeQName) |
protected void |
generateContructor()
Generates the default constructor.
|
protected void |
generateFields(com.google.gwt.user.rebind.rpc.SerializableTypeOracle serializableTypeOracle)
Generates the private members of the proxy class.
|
protected void |
generateMethod(java.lang.reflect.Method method)
Generates the code of a given Java method (must be correctly annotated using
Restlet annotation).
|
protected void |
generateProxy()
Generates the code of the proxy class.
|
protected void |
generateSerializers()
Generates the code of the necessary object serializers.
|
protected java.lang.String |
getClassName()
Returns the name of the proxy class that will be generated.
|
protected com.google.gwt.core.ext.typeinfo.JClassType |
getClassType()
Returns the parent type.
|
protected com.google.gwt.core.ext.GeneratorContext |
getContext()
Returns the context object that provides metadata to defered binding
generators.
|
protected com.google.gwt.core.ext.TreeLogger |
getLogger()
Returns the logger used by the deferred binding generator.
|
protected java.lang.String |
getPackageName()
Returns the package name of the parent type.
|
protected com.google.gwt.user.rebind.SourceWriter |
getSourceWriter()
Returns the writer used for the content of the proxy class.
|
protected com.google.gwt.user.rebind.rpc.SerializableTypeOracle |
getSto()
Returns the serializer class.
|
protected com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder |
getStob()
Returns the builder of the serializer class.
|
protected com.google.gwt.core.ext.typeinfo.TypeOracle |
getTypeOracle()
Returns the type oracle for the current generator context.
|
protected java.lang.String |
getTypeQName()
Returns the parent type for which a default constructible subclass will be
generated.
|
protected void |
indent()
Increments the indentation of the generated source code.
|
protected void |
outdent()
Decrements the indentation of the generated source code.
|
protected void |
print(java.lang.String value)
Prints the given value in the generated source code.
|
protected void |
println()
Terminates the current line with a new line separator.
|
protected void |
println(java.lang.String value)
Prints the given value in the generated source code and terminates the
current line with a new line separator.
|
public java.lang.String generate(com.google.gwt.core.ext.TreeLogger logger, com.google.gwt.core.ext.GeneratorContext context, java.lang.String typeQName) throws com.google.gwt.core.ext.UnableToCompleteException
generate
in class com.google.gwt.core.ext.Generator
com.google.gwt.core.ext.UnableToCompleteException
protected void generateContructor()
protected void generateFields(com.google.gwt.user.rebind.rpc.SerializableTypeOracle serializableTypeOracle)
serializableTypeOracle
- The type of the object serializer/deserializer.protected void generateMethod(java.lang.reflect.Method method) throws java.lang.Exception
method
- The Java method.java.lang.Exception
protected void generateProxy() throws java.lang.Exception
java.lang.Exception
protected void generateSerializers() throws com.google.gwt.core.ext.UnableToCompleteException
com.google.gwt.core.ext.UnableToCompleteException
protected java.lang.String getClassName()
protected com.google.gwt.core.ext.typeinfo.JClassType getClassType()
protected com.google.gwt.core.ext.GeneratorContext getContext()
protected com.google.gwt.core.ext.TreeLogger getLogger()
protected java.lang.String getPackageName()
protected com.google.gwt.user.rebind.SourceWriter getSourceWriter()
protected com.google.gwt.user.rebind.rpc.SerializableTypeOracle getSto()
protected com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder getStob()
protected com.google.gwt.core.ext.typeinfo.TypeOracle getTypeOracle()
protected java.lang.String getTypeQName()
protected void indent()
protected void outdent()
protected void print(java.lang.String value)
value
- The value to write.protected void println()
protected void println(java.lang.String value)
value
- The value to write.Copyright © 2005-2024 Restlet.