I am trying to create an annotation for a local variable. I know that I do not have annotation in the generated bytecode But I should be able to get information in the compilation of time by doing something like this:
@Target ({ElementType .LOCAL_VARIABLE}) @ Retention Policy (SOURCE) Public @ interface junk {string value (); } Only when it specifies the processor format, it is not processed by javac, or it is "junk" in the supported types of the following:
< Pre> square junctster {public static zero main (string [] args) {@Junk string TMP = "Hello World"; Println (tmp); }} This will happen when I take the @Junk annotation to public static
before being taken into consideration and action?
Some quickly tested and searched something, and it is LOCAL_VARIABLE isn ' T is actually supported ... yet:
may be completely wrong, but how it looks ...
Comments
Post a Comment