Hi all,

i have method :
public static final <T>void callJSONRPCService(AsyncCallback<T> 
RpcCallBack){
 Request request = builder.sendRequest(jsonRequest, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
if (200 == response.getStatusCode()) {
   // here I need detect generics type of class T

  .....
}
class MyRpcObject{
public parseJSONPresenter(JSONObject json){
 //here is convert json object values to properties of this instance
}
}

class TestObject extends MyRpcObject{
.....
}

and use it like 
callJSONRPCService(new PhpRpcCallback<TestObject>)
or like
callJSONRPCService(new PhpRpcCallback<String>)
callJSONRPCService(new PhpRpcCallback<int>)

and I need know generics type of T for parsing JSON to to type of T .
generics type T is only MyRpcObject or all primitive types with string. when 
is MyRpcObject I need change form json to T 
with TestObject.parseJSONPresenter;


is this possible ? 
thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to