O'Reilly logo

Core Java™ 2 Volume II - Advanced Features, Seventh Edition by Gary Cornell, Cay S. Horstmann

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Addition of Metadata to Programs

Metadata are data about data. In the context of computer programs, metadata are data about the code. A good example for metadata is Javadoc comments. The comments describe the code, but they do not modify its meaning.

Starting with JDK 5.0, you can use annotations to insert arbitrary data into your source code. Why would you want to do this? Metadata are only useful in conjunction with tools. As we write this chapter, there are many promises that useful tools will soon appear. This chapter introduces you to the syntax for annotations and gives examples that demonstrate some of the possibilities. This should help you evaluate the tools that will emerge, and it might even give you ideas for building your own tools. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required