I like the use of annotations, but I would like to write a framework which performs these checks at runtime.
Opened this issue · 0 comments
GoogleCodeExporter commented
> What steps will reproduce the problem?
1. perform getAnnotations at runtime, they will not be found as they have
RetentionPolicy.CLASS retention.
> What is the expected output? What do you see instead?
This information is useful at runtime.
One use is runtime validation of information from external sources e.g.
user input, data from other services, configuration files.
Another use is controlling serialization. I have an Immutable annotation I
use which changes how a class is serialized. (using custom serialization)
For Immutable classes, all instances which are equals() become the same
instance on deserialization. For other classes, identity == is used.
Original issue reported on code.google.com by peter.la...@gmail.com
on 27 Jan 2009 at 4:52