Hello everybody !

I have a subclass of a JavaScriptObject with a generic type T.

public class Foo<T> extends JavaScriptObject {
  // ...
}

In this class, I have a getValue() method that returns a T value.

private final native T getValue() /*-{
  return this.value;
}-*/;

In my situation, T is an Integer. When I running the code I have the
following exception :

 Caused by: java.lang.ClassCastException: Cannot cast
java.lang.Integer to com.google.gwt.core.client.JavaScriptObject

Is the value is a 'int', it works well. But not the Integer.

How can I fix the problem ?
Any workarrounds ?

Thanks !

Sandro Munda
<[email protected]>

-- 
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