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. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access