A simpler model for repeating annotations
Alex Buckley
alex.buckley at oracle.com
Wed Jan 30 15:16:54 PST 2013
On 1/7/2013 10:55 AM, Alex Buckley wrote:
> With regard to names, an advantage of getAnnotationsWithMultiples(Class)
> is that it will appear after the legacy methods, which I think is better
> than appearing first like getAllAnnotations(Class). Stay tuned.
I give you: getAnnotationsByType(Class)
- Reminiscent of getAnnotations(Class), but not an overload.
- Avoids contentious phrases like "all", "repeated", and "container".
- Lexicographically convenient:
getAnnotation(Class) getDeclaredAnnotation(Class)
getAnnotations() getDeclaredAnnotations()
getAnnotationsByType(Class) getDeclaredAnnotationsByType(Class)
Alex
More information about the enhanced-metadata-spec-discuss
mailing list