This is not really a cry for help, more just a grumble. I had this great idea to include in my unit tests a check to see if my server- side RPC implementation class was being registered properly by grabbing the URL out of the <? extends> RemoteService interfaces using reflection to get the @RemoteServiceRelativePath annotation and then using the URL inside of it to test if the server was correctly set up.
After going mental for a few hours I stumbled across the @Retention annotation that is used (or in this case, not used) to tell Java where to store the annotation. In the case of @RemoteServiceRelativePath there is no @Retention in the annotation's definition which means it falls back to the default of storing the URL in the code, the bytecode but not in memory once the class is loaded at runtime. I get that the annotation is really mainly used for compiling into JavaScript, but would it be hard to define it's retention as RUNTIME? I'm in the habit of doing most of my unit testing with actual java objects and only using GWTTestCase when I really need it (results in much faster tests). Specifying the annotation as CLASS retention policy means I have no way of accessing the information inside of it during my unit tests. I'm just wondering, is this by design or is it just how it is for no real reason? Does anyone know? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
