|
GWT 2.0.3 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.rpc.server.ClientOracle
com.google.gwt.rpc.server.WebModeClientOracle
public final class WebModeClientOracle
Encapsulates data about the structure of the client code.
Nested Class Summary | |
---|---|
static class |
WebModeClientOracle.Builder
A Builder object to create ClientOracles. |
static class |
WebModeClientOracle.Triple<A,B,C>
A pair with extra data. |
Constructor Summary | |
---|---|
protected |
WebModeClientOracle()
Instances of WebModeClientOracle are created either through the WebModeClientOracle.Builder class or via the load(java.io.InputStream) method. |
Method Summary | |
---|---|
com.google.gwt.rpc.client.ast.CommandSink |
createCommandSink(java.io.OutputStream out)
Create a CommandSink that can encode a payload for the client. |
java.lang.String |
createUnusedIdent(java.lang.String ident)
Returns an identifier that does not conflict with any symbols defined in the client. |
java.lang.String |
getFieldId(java.lang.Class<?> clazz,
java.lang.String fieldName)
Given a base type and the unobfuscated field name, find the obfuscated name for the field in the client. |
java.lang.String |
getFieldId(java.lang.Enum<?> value)
Return the field name for a given enum value. |
java.lang.String |
getFieldId(java.lang.String className,
java.lang.String fieldName)
This is similar to ClientOracle.getFieldId(Class, String) but does not search
supertypes. |
Pair<java.lang.Class<?>,java.lang.String> |
getFieldName(java.lang.Class<?> clazz,
java.lang.String fieldId)
Return the name of a field from a client-side id. |
java.lang.String |
getMethodId(java.lang.Class<?> clazz,
java.lang.String methodName,
java.lang.Class<?>... args)
This will search superclasses. |
java.lang.String |
getMethodId(java.lang.String className,
java.lang.String methodName,
java.lang.String... jsniArgTypes)
This is similar to ClientOracle.getMethodId(Class, String, Class...) but does
not search supertypes. |
java.lang.reflect.Field[] |
getOperableFields(java.lang.Class<?> clazz)
Returns the fields of a given class that should be serialized. |
java.lang.String |
getSeedName(java.lang.Class<?> clazz)
Returns the name of the top-level function that is used as the seed function for a given type. |
int |
getTypeId(java.lang.Class<?> clazz)
Returns the assigned typeId of a given type or 0. |
java.lang.String |
getTypeName(java.lang.String seedName)
Returns the deobfuscated name of a type based on the name of the type's seed function. |
boolean |
isScript()
Indicates whether or not the remote client is running as compiled script. |
static WebModeClientOracle |
load(java.io.InputStream stream)
Recreate a WebModeClientOracle based on the contents previously emitted by store(java.io.OutputStream) . |
void |
store(java.io.OutputStream stream)
Write the state of the WebModeClientOracle into an OutputStream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected WebModeClientOracle()
WebModeClientOracle.Builder
class or via the load(java.io.InputStream)
method.
Method Detail |
---|
public static WebModeClientOracle load(java.io.InputStream stream) throws java.io.IOException
store(java.io.OutputStream)
. The underlying format should be considered opaque.
java.io.IOException
public com.google.gwt.rpc.client.ast.CommandSink createCommandSink(java.io.OutputStream out) throws java.io.IOException
ClientOracle
createCommandSink
in class ClientOracle
out
- the OutputStream to which the output will be written
java.io.IOException
- if the CommandSink cannot write to the OutputStreampublic java.lang.String createUnusedIdent(java.lang.String ident)
ClientOracle
createUnusedIdent
in class ClientOracle
public java.lang.String getFieldId(java.lang.Class<?> clazz, java.lang.String fieldName)
ClientOracle
getFieldId
in class ClientOracle
public java.lang.String getFieldId(java.lang.Enum<?> value)
ClientOracle
getFieldId
in class ClientOracle
public java.lang.String getFieldId(java.lang.String className, java.lang.String fieldName)
ClientOracle
ClientOracle.getFieldId(Class, String)
but does not search
supertypes. It is intended to be used to access "magic" GWT types.
getFieldId
in class ClientOracle
public Pair<java.lang.Class<?>,java.lang.String> getFieldName(java.lang.Class<?> clazz, java.lang.String fieldId)
ClientOracle
getFieldName
in class ClientOracle
public java.lang.String getMethodId(java.lang.Class<?> clazz, java.lang.String methodName, java.lang.Class<?>... args)
getMethodId
in class ClientOracle
public java.lang.String getMethodId(java.lang.String className, java.lang.String methodName, java.lang.String... jsniArgTypes)
ClientOracle
ClientOracle.getMethodId(Class, String, Class...)
but does
not search supertypes. It is intended to be used to access "magic" GWT
types.
getMethodId
in class ClientOracle
public java.lang.reflect.Field[] getOperableFields(java.lang.Class<?> clazz)
ClientOracle
getOperableFields
in class ClientOracle
public java.lang.String getSeedName(java.lang.Class<?> clazz)
ClientOracle
getSeedName
in class ClientOracle
public int getTypeId(java.lang.Class<?> clazz)
ClientOracle
getTypeId
in class ClientOracle
public java.lang.String getTypeName(java.lang.String seedName)
ClientOracle
getTypeName
in class ClientOracle
public boolean isScript()
ClientOracle
isScript
in class ClientOracle
public void store(java.io.OutputStream stream) throws java.io.IOException
java.io.IOException
|
GWT 2.0.3 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |