
jsr-305 - issue #3
I like the use of annotations, but I would like to write a framework which performs these checks at runtime.
> 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.
Status: New
Labels:
Type-Defect
Priority-Medium