com.terheyden.event.NonnullByDefault Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of event-router Show documentation
Show all versions of event-router Show documentation
Simple, fast, flexible event router / event bus for Java
The newest version!
package com.terheyden.event;
import javax.annotation.Nonnull;
import javax.annotation.ParametersAreNonnullByDefault;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
/**
* Declares the following defaults for the entire package:
* Methods don't return null.
* Method params are not null.
* Fields are never set to null.
*
* Local vars can be null, sure, that's internal biz.
*
* This code was copied and modified from {@link ParametersAreNonnullByDefault}.
*
* See also:
* package-info.java
* https://stackoverflow.com/questions/13310994/set-findbugs-notnull-as-default-for-all-classes-under-a-package
* https://stackoverflow.com/questions/3550292/what-do-java-annotation-elementtype-constants-mean
*/
@Documented
@Nonnull
@Retention(RetentionPolicy.RUNTIME)
public @interface NonnullByDefault {
// Empty.
}