How to access Local Varaible Annotation ?


General J2EE: How to access Local Varaible Annotation ?

  1. How to access Local Varaible Annotation ? (3 messages)

    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 Chester

    Threaded Messages (3)

  2. yes. you are right... here is an interesting java forum read : Bhagvan K
  3. form links[ Go to top ]

    Yes , plz read this below form
  4. forms for u r question[ Go to top ]

    yes, here some more forums