diff options
Diffstat (limited to 'src/org/uic/barcode/asn1/datatypes/Asn1Optional.java')
-rw-r--r-- | src/org/uic/barcode/asn1/datatypes/Asn1Optional.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/org/uic/barcode/asn1/datatypes/Asn1Optional.java b/src/org/uic/barcode/asn1/datatypes/Asn1Optional.java new file mode 100644 index 0000000..71946ec --- /dev/null +++ b/src/org/uic/barcode/asn1/datatypes/Asn1Optional.java @@ -0,0 +1,20 @@ +package org.uic.barcode.asn1.datatypes; + +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; + +/** + * Indicates that the field is OPTIONAL in ASN.1. Implemented as null. Equivalent to @Nullable. + * + * Using Optional<T> would require Manifests to capture generics (like in Gson). + * + */ +@Target({ElementType.FIELD}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface Asn1Optional { + +} |