summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/uic/barcode/asn1/uper/ChoiceCoder.java
diff options
context:
space:
mode:
authorCGantert345 <57003061+CGantert345@users.noreply.github.com>2022-01-24 16:51:04 +0100
committerCGantert345 <57003061+CGantert345@users.noreply.github.com>2022-01-24 16:51:04 +0100
commit09f0f9449a10b713207126348105fafec4781bed (patch)
tree3e68c5dd9253443baf73de9895e8a57b4dcc52cc /src/main/java/org/uic/barcode/asn1/uper/ChoiceCoder.java
parentnew dynamic header version 2.0.0 (diff)
downloadUIC-barcode-09f0f9449a10b713207126348105fafec4781bed.tar
UIC-barcode-09f0f9449a10b713207126348105fafec4781bed.tar.gz
UIC-barcode-09f0f9449a10b713207126348105fafec4781bed.tar.bz2
UIC-barcode-09f0f9449a10b713207126348105fafec4781bed.tar.lz
UIC-barcode-09f0f9449a10b713207126348105fafec4781bed.tar.xz
UIC-barcode-09f0f9449a10b713207126348105fafec4781bed.tar.zst
UIC-barcode-09f0f9449a10b713207126348105fafec4781bed.zip
Diffstat (limited to 'src/main/java/org/uic/barcode/asn1/uper/ChoiceCoder.java')
-rw-r--r--src/main/java/org/uic/barcode/asn1/uper/ChoiceCoder.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/org/uic/barcode/asn1/uper/ChoiceCoder.java b/src/main/java/org/uic/barcode/asn1/uper/ChoiceCoder.java
index d17a813..0bbce73 100644
--- a/src/main/java/org/uic/barcode/asn1/uper/ChoiceCoder.java
+++ b/src/main/java/org/uic/barcode/asn1/uper/ChoiceCoder.java
@@ -95,7 +95,7 @@ class ChoiceCoder implements Decoder, Encoder {
@Override public <T> T decode(BitBuffer bitbuffer,
Class<T> classOfT, Field field1,
- Annotation[] extraAnnotations) {
+ Annotation[] extraAnnotations, AsnExtractor extractor) {
AnnotationStore annotations = new AnnotationStore(classOfT.getAnnotations(),extraAnnotations);
UperEncoder.logger.debug(String.format("CHOICE: %s", classOfT.getName()));
T result = UperEncoder.instantiate(classOfT);
@@ -120,7 +120,7 @@ class ChoiceCoder implements Decoder, Encoder {
Class<?> classOfElement = field != null ? field.getType() : null;
if (field != null) {
try {
- Object decodedValue = UperEncoder.decodeAsOpenType(bitbuffer, classOfElement,field, field.getAnnotations());
+ Object decodedValue = UperEncoder.decodeAsOpenType(bitbuffer, classOfElement,field, field.getAnnotations(),extractor);
if (field != null) {
field.set(result, decodedValue);
}
@@ -144,7 +144,7 @@ class ChoiceCoder implements Decoder, Encoder {
UperEncoder.newRange(0, sorter.ordinaryFields.size() - 1, false));
Field f = sorter.ordinaryFields.get(index);
UperEncoder.logger.debug(String.format("CHOICE: selected %s", f.getName()));
- Object fieldValue = UperEncoder.decodeAny(bitbuffer, f.getType(),f, f.getAnnotations());
+ Object fieldValue = UperEncoder.decodeAny(bitbuffer, f.getType(),f, f.getAnnotations(),extractor);
try {
f.set(result, fieldValue);
} catch (IllegalArgumentException | IllegalAccessException e) {