|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.core.ext.Generator
org.restlet.rebind.ClientProxyGenerator
public class ClientProxyGenerator
Deferred binding generator capable of creating a subclass of
GwtClientProxy
implementing a custom Java interface, extending the
marker ClientProxy
interface, and annotated with Restlet annotations
such as Get
, Post
, Put
or Delete
.
Constructor Summary | |
---|---|
ClientProxyGenerator()
Default constructor. |
Method Summary | |
---|---|
java.lang.String |
generate(TreeLogger logger,
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 JClassType |
getClassType()
Returns the parent type. |
protected GeneratorContext |
getContext()
Returns the context object that provides metadata to defered binding generators. |
protected 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 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. |
Methods inherited from class com.google.gwt.core.ext.Generator |
---|
escape |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClientProxyGenerator()
Method Detail |
---|
public java.lang.String generate(TreeLogger logger, GeneratorContext context, java.lang.String typeQName) throws UnableToCompleteException
generate
in class Generator
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 UnableToCompleteException
UnableToCompleteException
protected java.lang.String getClassName()
protected JClassType getClassType()
protected GeneratorContext getContext()
protected 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 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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |