• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Annotation anyone?

 
Juan Rolando Prieur-Reza
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So far I have found all java 5 new features useful in this and other projects, except for Annotations. Other than its usefulness to IDEs, frameworks, and tool-development, has anyone found much use for the Annotations API in their own application coding (for this project, say)?
 
Thomas Bigbee
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My understanding (from JBoss Server and Hibernate training) is that annotations are really just a way to pull external mapping files, etc... inside your code were there are more easily matained, this is much appreciated in the new EJB3 spec, Eclipse and some other IDEs like you to have annotations set (depending upon your configuration), however, I have not seen any reason to include annotations in this project, the only thing I can think of is that someone wanted to do testing with Reflection or some 3rd party library.
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12007
215
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi John,

Annotations are great - take a look at XDoclet as one example of using metadata to generate class files and configuration files. However I am sorry to say that this is one feature of JDK 5 that I haven't found a use for when working with SCJD. My publisher would have liked us to use it in the book, however we just couldn't see an easy way to do so - anything we could do would have been very contrived, and could have been done easier without annotations .

Regards,

Andrew
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic