This topic has not yet been written. The content below is from the topic description.
Declaring Metadata Open up metadata-aop.xml. This is the source file for where our annotations will be declared. This file is composed of a list of metadata tags. Each such tag must have two attributes: tag and class. The tag attribute is the name of the metadata, equivalent to the name of an annotation. The class attribute must contain a class expression. Every class matching that expression will be bound to the metadata. Take a look at the two first tags of metadata-aop.xml: 0.01 The first one represents a metadata @Trace and the second one represents the metadata @Billable. Both metadata will be applied to class POJO, as specified in the class attribute. The contents of a metadata tag indicate to which elements of POJO class this metadata should be applied. In the example, the metadata @Trace will be applied to the default constructor of POJO(). The metada @Billable will be also applied to the same constructor, and has an attribute, amount, whose value is 0.01. Following this same format you can define as many attributes and values you need. In similar ways, a metadata can be applied to the fields, methods and to the class itself, just like Java annotations. The next metadata tags apply metadata to constructors, methods and fields: 0.01 0.05 If we wanted to apply @Trace to POJO class, we could have added an empty class XML tag to a metadata element: The example bellow states that every constructor, field, and method of POJO class will be bound to the @Trace metadata: