• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Annotations Inheritence

 
Ranch Hand
Posts: 144
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

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 ;)
 
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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). "
 
R van Vliet
Ranch Hand
Posts: 144
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
He baked a muffin that stole my car! And this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic