-
9 Mar 2009 1:08 AM #1
Custom Annotations in GWT on Client side
Custom Annotations in GWT on Client side
hi,
i know this is part of GWT - but let me please ask this question.
is it possible to use custom annotations in GWT on the client side?
i tried this for a class and wanted to get the annotation data with this.getClass().getAnnotations() in the constructor. But i get the error "The method getAnnotations() is undefined for the type Class ..."
thx paco
-
29 Dec 2009 7:31 PM #2
Need answer to this aswell.
Did you find out why this is happening?
Thanks
-
30 Dec 2009 12:02 AM #3
Annotations in client code can be used during GWT's rebind phase of the
compilation, but they are not accessible at runtime on the client side.
have a look at:
---------------
http://groups.google.com/group/googl...d66440f4c6a59f
-
25 Jul 2011 5:38 AM #4
you can use a GWT reflection library, i.e., gwtent
Code:ClassType type = TypeOracle.Instance.getClassType(getClass().getName()); Annotation[] annotations = type.getAnnotations();


Reply With Quote