@RequiredModifiers(modifier = Modifier.PUBLIC)
@interface MyAnnotation {}
will be considered illegal when used on non-public elements such as:
@MyAnnotation void foo() {}
| Modifier and Type | Method and Description |
|---|---|
| public Modifier[] | |
| public Modifier[] |
| modifier | back to summary |
|---|---|
| public Modifier[] modifier() The required modifiers. The annotated element is illegal if any one or more of these modifiers are absent. Empty array has the same effect as not applying this annotation at all; duplicates are allowed but have no effect. | |
| value | back to summary |
|---|---|
| public Modifier[] value()
Deprecated use
| |