Enum | Description |
---|---|
Modifier |
Modifiers in the Java language, as specified in:
https://docs.oracle.com/javase/specs/jls/se11/html/jls-8.html#jls-8.1.1
https://docs.oracle.com/javase/specs/jls/se11/html/jls-8.html#jls-8.3.1
https://docs.oracle.com/javase/specs/jls/se11/html/jls-8.html#jls-8.4.3
https://docs.oracle.com/javase/specs/jls/se11/html/jls-9.html#jls-9.4
|
Annotation Type | Description |
---|---|
CanIgnoreReturnValue |
Indicates that the return value of the annotated method can be safely ignored.
|
CheckReturnValue |
Indicates that the return value of the annotated method must be checked.
|
CompatibleWith |
Declares that a parameter to a method must be "compatible with" one of the type parameters in the
method's enclosing class, or on the method itself.
|
CompileTimeConstant |
Annotation for method parameter and class field declarations, which denotes that corresponding
actual values must be compile-time constant expressions.
|
DoNotCall |
The method to which this annotation is applied cannot be called.
|
DoNotMock |
Annotation representing a type that should not be mocked.
|
FormatMethod |
Annotation for a method that takes a printf-style format string as an argument followed by
arguments for that format string.
|
FormatString |
Annotation for method parameter declarations which denotes that actual parameters will be used as
a format string in printf-style formatting.
|
ForOverride |
Indicates that the annotated method is provided only to be overridden: it should not be
invoked from outside its declaring source file (as if it is
private ), and
overriding methods should not be directly invoked at all. |
Immutable |
The class to which this annotation is applied is immutable.
|
IncompatibleModifiers |
Annotation declaring that the target annotation is incompatible with any one of the provided
modifiers.
|
InlineMe |
Indicates that callers of this API should be inlined.
|
InlineMeValidationDisabled |
An annotation that disables validation of the
InlineMe annotation's correctness (i.e.:
that it accurately represents an inlining of the annotated method). |
MustBeClosed |
Annotation for constructors of AutoCloseables or methods that return an AutoCloseable and require
that the resource is closed.
|
NoAllocation |
Annotation for method declarations, which denotes that this method will not cause allocations
that are visible from source code.
|
OverridingMethodsMustInvokeSuper |
Indicates that any concrete method that overrides the annotated method, directly or indirectly,
must invoke
super.theAnnotatedMethod(...) at some point. |
RequiredModifiers |
Annotation declaring that the target annotation requires all the specified modifiers.
|
RestrictedApi |
Restrict this method to callsites with a allowlist annotation.
|
SuppressPackageLocation |
Indicates that the PackageLocation warning should be suppressed for this package.
|
Var |
The parameter or local variable to which this annotation is applied is non-final.
|
Copyright © 2021 Google LLC. All rights reserved.