-
How to access Local Varaible Annotation ? (3 messages)
- Posted by: Chester Chen
- Posted on: September 15 2006 13:24 EDT
Hi, I am playing with the idea of using local variable annotation to generate Resource Bundle file. So that the exception message are not hard coded and can be localzied. This approach allows developer to coded the message in one place (.java file) instead of jumping bewteeen resource bundle property file and java file. Once I started, I realize I am not sure how to access Local Veriable annotation to do this. There are several potential approaches: but none of them seems work: 1. using Annotation Processing Tool (APT). In APT, the local variable is invisible. Sun stated "Annotations on local variables are invisible since the declaration hierarchy does not model program structure inside a method or constructor." on the APT website. 2. Using reflection or AOP doesn't work, as local variable annotation has only SOURCE Retention. Is there a way of accessing local variable annotation in Java 5 ? Thanks ChesterThreaded Messages (3)
- Re: How to access Local Varaible Annotation ? by Bhagvan K on September 17 2006 22:14 EDT
- form links by Vijay Murugan on September 18 2006 02:49 EDT
- forms for u r question by Vijay Murugan on September 18 2006 02:49 EDT
-
Re: How to access Local Varaible Annotation ?[ Go to top ]
- Posted by: Bhagvan K
- Posted on: September 17 2006 22:14 EDT
- in response to Chester Chen
yes. you are right... here is an interesting java forum read : http://forum.java.sun.com/thread.jspa?threadID=664018 Bhagvan K http://www.jroller.com/page/bhagvank -
form links[ Go to top ]
- Posted by: Vijay Murugan
- Posted on: September 18 2006 02:49 EDT
- in response to Chester Chen
Yes , plz read this below form http://forums.java.net/jive/thread.jspa?threadID=13207&messageID=85663 -
forms for u r question[ Go to top ]
- Posted by: Vijay Murugan
- Posted on: September 18 2006 02:49 EDT
- in response to Chester Chen
yes, here some more forums http://forums.java.net/jive/thread.jspa?threadID=13207&messageID=85663