1. @Retention(retentionPolicy.runtime) /** * retentionPolicy.source retained in. Java when compiled to class will be discarded * retentionPolicy.class The default lifecycle * retentionPolicy. RUNTIME is not only saved to the class file but also exists after the JVM loads the class fileCopy the code
  2. @target (elementType.field) /** * elementType. TYPE Interface class enumeration * elementType. FIELD FIELD enumeration constant * elementType. METHOD METHOD * Elementtype. PARAMETER Method argument * elementtype. CONSTRUCTOR CONSTRUCTOR * elementType. LOCAL_VARIABLE Local variable * ElementType.ANNOTATION_TYPE * ElementType.PACKAGE PACKAGE */Copy the code
  3. @inherited // Whether a child class can inherit or notCopy the code
  4. Documented (@documented // Documented)Copy the code