ParametersAreNonnullByDefault
instead
of @DefaultAnnotation(NonNull.class) so that method parameters are nonnull by default in the annotated
element. You can also use TypeQualifierDefault
in general to define your own annotation that specifies a default type qualifier. For example,
Nonnegative
TypeQualifierDefault
(ElementType.PARAMETER
)
public @interface ParametersAreNonnegativeByDefault {}
The JSR305 CheckReturnValue
annotation can be applied to a type or package, and it will act as a default for all methods
in that class or package unless otherwise overridden.
@Documented @Target(value={TYPE,PACKAGE}) @Retention(value=CLASS) @Deprecated public @interface DefaultAnnotation
Modifier and Type | Required Element and Description |
---|---|
Class<? extends Annotation>[] |
value
Deprecated.
|
Modifier and Type | Optional Element and Description |
---|---|
Confidence |
confidence
Deprecated.
|
Priority |
priority
Deprecated.
|
public abstract Class<? extends Annotation>[] value
@Deprecated public abstract Priority priority
public abstract Confidence confidence
Copyright © 2015. All rights reserved.