The Artima Developer Community
Sponsored Link

Java Buzz Forum
Annotations + Inheritance = Confusion

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Mike Kaufman

Posts: 125
Nickname: mkaufman
Registered: Jan, 2007

Mike Kaufman started programming in 1973 and is still here.
Annotations + Inheritance = Confusion Posted: Jul 21, 2007 10:59 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Mike Kaufman.
Original Post: Annotations + Inheritance = Confusion
Feed Title: Closing Braces
Feed URL: https://closingbraces.net/feed/
Feed Description: After-hours notes and opinions on Java and system development.
Latest Java Buzz Posts
Latest Java Buzz Posts by Mike Kaufman
Latest Posts From Closing Braces

Advertisement
Whilst Java annotations support an "@Inherit" meta-annotation to specify whether the annotation is inherited or not, some annotations specify far more complex annotation-specific interactions with Java's normal inheritance, hiding and overriding behaviour. This can easily become complex and confusing, especially given the variety of such rules, the use of natural-language descriptions to define them, and the absence of supporting code to implement the rules. Whilst JSR 250 "Common Annotations" includes some general guidelines, even its own annotations remain ambiguous and confusing. This is only likely to get worse as more and more annotations are introduced into Java. One possible solution might be to provide a more powerful and comprehensive set of meta-annotations for defining annotations. In the meantime I'd urge anybody designing an annotation to try to keep its interaction with inheritance as simple as possible, even if this is less than optimal for that particular annotation, and failing that to provide an implementation for any rules regarding how the annotation should be handled.

Read: Annotations + Inheritance = Confusion

Topic: Ryan Stewart's favourite Flash site Previous Topic   Next Topic Topic: Firefox Tip: How To Change “Do This Automatically For Files Like This From Now On”...

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use