diff options
author | Eric Kuck <eric@bluelinelabs.com> | 2018-07-12 19:10:35 -0500 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-07-13 03:46:23 +0200 |
commit | 67ea8b2936343526ff0b3f476c515f0e11dbb272 (patch) | |
tree | 84f904d66f6111a7d8f897164eb236bc62199cae /app/src/main/java/com/wireguard/util | |
parent | fbaa4d9ab1b59ba4610fe273743872f35e7e9091 (diff) |
global: Add nullity annotations
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
Diffstat (limited to 'app/src/main/java/com/wireguard/util')
-rw-r--r-- | app/src/main/java/com/wireguard/util/NonNullForAll.java | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/app/src/main/java/com/wireguard/util/NonNullForAll.java b/app/src/main/java/com/wireguard/util/NonNullForAll.java new file mode 100644 index 00000000..f74cb616 --- /dev/null +++ b/app/src/main/java/com/wireguard/util/NonNullForAll.java @@ -0,0 +1,25 @@ +/* + * Copyright © 2018 Eric Kuck <eric@bluelinelabs.com>. + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.wireguard.util; + +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 + * class fields and method parameters and return values in that element are nonnull + * by default unless overridden. + */ +@Documented +@Nonnull +@TypeQualifierDefault({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER}) +@Retention(RetentionPolicy.RUNTIME) +public @interface NonNullForAll { } |