We're running into a situation where annotation inheritence would help us out. This is currently not possible and we were wondering why this could be. Note we're talking about one annotation interface extending another, not inheriting the annotations of a super class to a child class (which is done using @Inheritence).
For example :
Does anyone know the practical or technical reasoning behind not allowing this? I can't come up with any convincing ones ;)
Jeff Storey
Ranch Hand
Joined: Apr 07, 2007
Posts: 230
posted
0
The expert group for JSR-175 (annotations) decided it would keep things simpler. This is from the JSR (I was having trouble getting to the site but I got this from another forum post):
"Why don't you support annotation subtyping (where one annotation type extends another)?
It complicates the annotation type system, and makes it much more difficult to write "Specific Tools" (per the taxonomy in Section VI). "
Jeff Storey
Software Developer
[url]http://jeffastorey.blogspot.com[/url]
R van Vliet
Ranch Hand
Joined: Nov 10, 2007
Posts: 144
posted
0
Jeff Storey wrote:The expert group for JSR-175 (annotations) decided it would keep things simpler. This is from the JSR (I was having trouble getting to the site but I got this from another forum post):
"Why don't you support annotation subtyping (where one annotation type extends another)?
It complicates the annotation type system, and makes it much more difficult to write "Specific Tools" (per the taxonomy in Section VI). "
Hm, how odd. It would be more straightforward if it reflects the way interfaces work up to a point. I'll read the motivation in the JSR but the "well hey it's too difficult" reasoning seems a bit of an easy out to me.