Top Description Methods
com.google.errorprone.annotations

public @Interface RequiredModifiers

extends Annotation
Annotations
@Documented
@Retention:CLASS
@Target:ANNOTATION_TYPE
Imports
java.lang.annotation.Documented, .ElementType, .Retention, .RetentionPolicy, .Target

Annotation declaring that the target annotation requires all the specified modifiers. For example, an annotation declared as:
@RequiredModifiers(modifier = Modifier.PUBLIC)
@interface MyAnnotation {}

will be considered illegal when used on non-public elements such as:

@MyAnnotation void foo() {}
Author
[email protected] (Jige Yu)

Method Summary

Modifier and TypeMethod and Description
public Modifier[]
modifier()

The required modifiers.

public Modifier[]
value()

Deprecated use modifier instead
Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

modifierback 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.

valueback to summary
public Modifier[] value()

Deprecated

use modifier instead

Annotations
@Deprecated