Annotation use
Originally Posted by
Ryan
Hello,
I was wondering about the annotations I so frequently see in the JADE code examples. I don't really know a whole lot about annotations, but from what I understand, they don't normally define behaviour or variables...
Do you use a special library or framework to make them do something useful? Or are you just accessing them reflexively at runtime?
Thanks.
Actually JADE does a lot of reflection to analyze objects and classes both during startup and while running the game. The annotations are used in many places all over the game to fine-tune the specific behaviour of items, monsters and the way the environment interacts with them.
Technically annotations yield meta-data that (depending on the way the specific annotation is defined) is available at compile-time or runtime. JADE uses lots of runtime metadata. Since annotations can take various parameters I use that feature intensively to fine-tune behaviour.
See the following links for more technical information (you need to understand Java):
http://java.sun.com/docs/books/tutor...notations.html
http://java.sun.com/j2se/1.5.0/docs/...notations.html
http://en.wikipedia.org/wiki/Java_annotation
Thomas Biskup
ADOM & Ultimate ADOM Maintainer
https://www.adom.de - https://www.ultimate-adom.com