
de.larssh.utils.annotations.NonNullByDefault Maven / Gradle / Ivy
package de.larssh.utils.annotations;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
import edu.umd.cs.findbugs.annotations.NonNull;
/**
* Indicates that all parameters, return values and fields of the class or
* package are annotated with {@link NonNull}. The default behavior can be
* overwritten using {@link edu.umd.cs.findbugs.annotations.Nullable}.
*
*
* While {@literal @ParametersAreNonnullByDefault}
* means "the method parameters in that element are nonnull by default",
* {@code @NonNullByDefault} handles parameters and also return values and
* fields.
*
*
* {@code @NonNullByDefault} is similar to {@code @DefaultAnnotation(NonNull.class)},
* but can be used together with Eclipse settings.
*/
@Documented
@Retention(RetentionPolicy.CLASS)
@Target({ ElementType.PACKAGE, ElementType.TYPE })
@DefaultAnnotation(NonNull.class)
public @interface NonNullByDefault {
// no annotation type elements needed
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy