CHAPTER 15

image

Adding Annotations

A very useful part of Java is its support for annotations, which are used to define what is sometimes referred to as metadata. To understand what benefits this feature provides, it’s helpful to first realize that the definition of metadata is “data about data.” In other words, metadata is information that describes other data. An example of where metadata has long been used in Java is the java.sql package that contains DatabaseMetaData, ResultSetMetaData, and the relatively new ParameterMetaData interfaces. As implied by the definition just mentioned and by their names, these classes encapsulate data that describes ...

Get Pro Java 8 Programming, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.