@Documented @Retention(value=CLASS) @Target(value=ANNOTATION_TYPE) public @interface RequiredModifiers
@RequiredModifiers(Modifier.PUBLIC) @interface MyAnnotation {}
will be considered illegal when used on non-public elements such as:
@MyAnnotation void foo() {}
public abstract Modifier[] value
Empty array has the same effect as not applying this annotation at all; duplicates are allowed but have no effect.
Copyright © 2018. All rights reserved.