The metadata is translated from the word metadata, which means "data on data". More and more open source frameworks provide "meta data" support, in fact, annotation support. Today the system learns Java annotations (Java metadata). The contents of this article are not limited to the comments of Javadoc.
1. What is Java metadata and what is the role?
metadata, which is "data about data." There are a lot of features too. You may have used the annotations of Javadoc to automatically generate documents. This is one of the meta data features. In general, metadata can be used to create documents, track code dependencies, perform compile-time format checks, and replace existing configuration files (such as hibernate also provides annotation configurations)
Note has 3 basic types
A. Tag annotations--No variables, only name identification. For example @annotation
B. Single value annotations-provides a piece of data based on a markup annotation. such as @annotation ("data")
C. Full comments-You can include multiple data members, each of which consists of a name and a value.
@annotation (val1= "data1", val2= "Data2")
2.Java "Notes"
3 built-in annotation types available in Java
A. Override, only for methods (not for classes, package declarations, or other constructs)
Function: can guarantee the correctness of the declaration of override function at compile time
Usage: @Override
public void Fun () {.}
B.deprecated also can only function and method
Function: Annotate a method that should not be reused
Usage: @Deprecated public void fun{///They say this annotation is on the same line as the function
C.supresswarnings can annotate a piece of code
Role: Turn off specific warning messages, such as when you are using generics without specifying a type
Usage: @SupressWarnings (value={"Unchecked"})
.. Code