summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/uic/barcode/asn1/datatypes/Asn1Optional.java
diff options
context:
space:
mode:
authorCGantert345 <57003061+CGantert345@users.noreply.github.com>2021-03-29 14:08:45 +0200
committerCGantert345 <57003061+CGantert345@users.noreply.github.com>2021-03-29 14:08:45 +0200
commite023e674020f1a435f7b8c8b9276704f576ea6e5 (patch)
tree011863c021df3e5356f07b056d30d0e7476061e4 /src/main/java/org/uic/barcode/asn1/datatypes/Asn1Optional.java
parentMerge pull request #13 from UnionInternationalCheminsdeFer/time_zone_fix_3 (diff)
downloadUIC-barcode-e023e674020f1a435f7b8c8b9276704f576ea6e5.tar
UIC-barcode-e023e674020f1a435f7b8c8b9276704f576ea6e5.tar.gz
UIC-barcode-e023e674020f1a435f7b8c8b9276704f576ea6e5.tar.bz2
UIC-barcode-e023e674020f1a435f7b8c8b9276704f576ea6e5.tar.lz
UIC-barcode-e023e674020f1a435f7b8c8b9276704f576ea6e5.tar.xz
UIC-barcode-e023e674020f1a435f7b8c8b9276704f576ea6e5.tar.zst
UIC-barcode-e023e674020f1a435f7b8c8b9276704f576ea6e5.zip
Diffstat (limited to 'src/main/java/org/uic/barcode/asn1/datatypes/Asn1Optional.java')
-rw-r--r--src/main/java/org/uic/barcode/asn1/datatypes/Asn1Optional.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/main/java/org/uic/barcode/asn1/datatypes/Asn1Optional.java b/src/main/java/org/uic/barcode/asn1/datatypes/Asn1Optional.java
new file mode 100644
index 0000000..71946ec
--- /dev/null
+++ b/src/main/java/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 {
+
+}