Java reflection can't work at client side code

On Jul 18, 7:24 am, Gianluigi <[email protected]> wrote:
> Hi to all, it's first time that i try to use annotation in client side gwt 
> application, i tried to compile that code:
>
> @Target( { ElementType.TYPE })
> @Retention(RetentionPolicy.RUNTIME)
> @interface MyAnn {
>     String value() default "";
>
> }
>
> @MyAnn(value="foo1")
> class B {}
>
> public class MyAnnotation {
>
>     public MyAnnotation() {}
>
>     public static final void foo() {
>
>         B b = new B();
>
>     MyAnn ann = b.getClass().getAnnotation(MyAnn.class);
>     GWT.log("" + b.getClass().isAnnotationPresent(MyAnn.class), null);
>
>     }
>
> }
>
> but when the GWT compiler reach getAnnotation OR isAnnotationPresent say to 
> me an error like this:
>
> [ERROR] Line 31: The method isAnnotationPresent(Class<MyAnn>) is undefined 
> for the type Class<capture#1-of ? extends B>
>
> What's wrong with my code? thanks for any hint
> Gian

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