> Hi there,
>
> the GWT compiler will not complain on annotations. But, I would like
> to check them on client side in Javascript.
>
> On server side, I usually use getAnnotations() from Class. But
> current JRE emulation by GWT does not provide getAnnotations()
> although it provide the Annotation class.
>
> So, my question: how can I check on client side if a given annotation
> is present or not ?
The idea is that because this is known at compile-time, you should use
a generator (<generate-with>, com.google.gwt.core.ext.Generator) so
you don't have to check the annotation itself at runtime (you could
generate an hasFooAnnotation method that actually checks whether the
object is an "instanceof" the classes known to have that annotation)
-- 
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
 
No comments:
Post a Comment