Re: GWT client side annotations
Hi, Client side java code is a subset of the entire JRE as it has to be translate to javascript. You should have a look here : http://code.google.com/intl/fr/webtoolkit/doc/1.6/RefJreEmulation.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: GWT client side annotations
For what i know GWT has no support for reflection... i think you may get the class name from the getClass() method. On Fri, Jul 17, 2009 at 8:24 PM, Gianluigi dava...@yahoo.it 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(ClassMyAnn) is undefined for the type Classcapture#1-of ? extends B What's wrong with my code? thanks for any hint Gian -- Quer aprender a programar? acompanhe: http://tcninja.blogspot.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: GWT client side annotations
Java reflection can't work at client side code On Jul 18, 7:24 am, Gianluigi dava...@yahoo.it 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(ClassMyAnn) is undefined for the type Classcapture#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 Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
GWT client side annotations
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(ClassMyAnn) is undefined for the type Classcapture#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 Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---