org.eclipse.ditto.utils.jsr305.annotations.AllValuesAreNonnullByDefault Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ditto-utils-jsr305 Show documentation
Show all versions of ditto-utils-jsr305 Show documentation
Eclipse Ditto is a framework for creating and managing digital twins in the IoT.
/*
* Copyright (c) 2017 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.eclipse.ditto.utils.jsr305.annotations;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import javax.annotation.Nonnull;
import javax.annotation.meta.TypeQualifierDefault;
/**
* This annotation can be applied to a package, class or method to indicate that
* all values should be treated as {@link Nonnull} by default. This applies to
*
* - fields,
* - method return values (constructors must not return {@code null} anyway),
* - and method parameters.
*
*
* NOTE: Package-level annotations are not passed to lower-level packages. Thus the annotation has to be provided for
* each package to become effective.
*/
@Documented
@Nonnull
@TypeQualifierDefault( {ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
public @interface AllValuesAreNonnullByDefault {
ElementType[] value() default {};
}