I\'m a little new to the Java 5 annotations and I\'m curious if either of these are possible:
This annotation would generate a simple getter and setter for you.
The @attribute you are referring too cant work with annotations as they are now in Java (as jamesh pointed out).
What you are probably looking for is "properties" which dont exist yet in Java. But is is a very hot topic right now, and we might get them in Java 7 or maybe Java 8 (as I am still stuck on 1.4.2 it wont help me, but it might help you).
There was an interesting discussion allusion to implementing properties with annotations in the Java Posse episode #219.