public abstract class ClientOracle extends Object
DelegatingClientOracle
type.Modifier and Type | Method and Description |
---|---|
abstract CommandSink |
createCommandSink(OutputStream out)
Create a CommandSink that can encode a payload for the client.
|
abstract String |
createUnusedIdent(String ident)
Returns an identifier that does not conflict with any symbols defined in
the client.
|
abstract CastableTypeData |
getCastableTypeData(Class<?> clazz)
Returns the Json castableType data for a given type.
|
abstract String |
getFieldId(Class<?> clazz,
String fieldName)
Given a base type and the unobfuscated field name, find the obfuscated name
for the field in the client.
|
abstract String |
getFieldId(Enum<?> value)
Return the field name for a given enum value.
|
abstract String |
getFieldId(String className,
String fieldName)
This is similar to
getFieldId(Class, String) but does not search
supertypes. |
abstract Pair<Class<?>,String> |
getFieldName(Class<?> clazz,
String fieldId)
Return the name of a field from a client-side id.
|
abstract String |
getMethodId(Class<?> clazz,
String methodName,
Class<?>... args)
Returns the name of the top-level function which implements the named
method that takes the exact arguments specified.
|
abstract String |
getMethodId(String className,
String methodName,
String... jsniArgTypes)
This is similar to
getMethodId(Class, String, Class...) but does
not search supertypes. |
abstract Field[] |
getOperableFields(Class<?> clazz)
Returns the fields of a given class that should be serialized.
|
abstract int |
getQueryId(Class<?> clazz)
Returns the assigned castability queryId of a given type.
|
abstract String |
getSeedName(Class<?> clazz)
Returns the name of the top-level function that is used as the seed
function for a given type.
|
abstract String |
getTypeName(String seedName)
Returns the deobfuscated name of a type based on the name of the type's
seed function.
|
abstract boolean |
isScript()
Indicates whether or not the remote client is running as compiled script.
|
public abstract CommandSink createCommandSink(OutputStream out) throws IOException
out
- the OutputStream to which the output will be writtenIOException
- if the CommandSink cannot write to the OutputStreampublic abstract String createUnusedIdent(String ident)
public abstract CastableTypeData getCastableTypeData(Class<?> clazz)
public abstract String getFieldId(Class<?> clazz, String fieldName)
public abstract String getFieldId(Enum<?> value)
public abstract String getFieldId(String className, String fieldName)
getFieldId(Class, String)
but does not search
supertypes. It is intended to be used to access "magic" GWT types.public abstract Pair<Class<?>,String> getFieldName(Class<?> clazz, String fieldId)
public abstract String getMethodId(Class<?> clazz, String methodName, Class<?>... args)
public abstract String getMethodId(String className, String methodName, String... jsniArgTypes)
getMethodId(Class, String, Class...)
but does
not search supertypes. It is intended to be used to access "magic" GWT
types.public abstract Field[] getOperableFields(Class<?> clazz)
public abstract int getQueryId(Class<?> clazz)
public abstract String getSeedName(Class<?> clazz)
public abstract String getTypeName(String seedName)
public abstract boolean isScript()
Copyright © 2018. All rights reserved.