Knowledge annotation class

@interface notes that this is a class automatically inherits the Annotation interfaces;

Note @Target active position, classes, methods, interfaces, etc.; @Target (ElementType.METHOD) indicates that this method works to annotation class;

@Retention (RetentionPolicy.RUNTIME) information indicating the comment is retained when the class files (bytecode files) when your program is compiled, it will be retained in the virtual machine is running,

So they can be read with a reflective manner;

@Documented solution indicates that the comment is made javadoc records;

Guess you like

Origin www.cnblogs.com/ww25/p/10995946.html