|
10 | 10 | import static de.rub.nds.modifiablevariable.util.StringUtil.backslashEscapeString;
|
11 | 11 |
|
12 | 12 | import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
13 |
| -import com.fasterxml.jackson.annotation.JsonSubTypes; |
14 | 13 | import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
15 | 14 | import de.rub.nds.modifiablevariable.biginteger.*;
|
16 |
| -import de.rub.nds.modifiablevariable.bool.BooleanExplicitValueModification; |
17 |
| -import de.rub.nds.modifiablevariable.bool.BooleanToggleModification; |
18 | 15 | import de.rub.nds.modifiablevariable.bytearray.*;
|
19 | 16 | import de.rub.nds.modifiablevariable.integer.*;
|
20 | 17 | import de.rub.nds.modifiablevariable.longint.*;
|
21 |
| -import de.rub.nds.modifiablevariable.singlebyte.ByteAddModification; |
22 |
| -import de.rub.nds.modifiablevariable.singlebyte.ByteExplicitValueModification; |
23 |
| -import de.rub.nds.modifiablevariable.singlebyte.ByteSubtractModification; |
24 |
| -import de.rub.nds.modifiablevariable.singlebyte.ByteXorModification; |
25 | 18 | import de.rub.nds.modifiablevariable.string.*;
|
26 | 19 | import de.rub.nds.modifiablevariable.util.ArrayConverter;
|
27 | 20 | import jakarta.xml.bind.annotation.XmlAccessType;
|
|
59 | 52 | */
|
60 | 53 | @XmlTransient
|
61 | 54 | @XmlAccessorType(XmlAccessType.FIELD)
|
62 |
| -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type") |
63 |
| -@JsonSubTypes({ |
64 |
| - @JsonSubTypes.Type(name = "BigIntegerAdd", value = BigIntegerAddModification.class), |
65 |
| - @JsonSubTypes.Type( |
66 |
| - name = "BigIntegerExplicitValue", |
67 |
| - value = BigIntegerExplicitValueModification.class), |
68 |
| - @JsonSubTypes.Type(name = "BigIntegerMultiply", value = BigIntegerMultiplyModification.class), |
69 |
| - @JsonSubTypes.Type(name = "BigIntegerShiftLeft", value = BigIntegerShiftLeftModification.class), |
70 |
| - @JsonSubTypes.Type( |
71 |
| - name = "BigIntegerShiftRight", |
72 |
| - value = BigIntegerShiftRightModification.class), |
73 |
| - @JsonSubTypes.Type(name = "BigIntegerSubtract", value = BigIntegerSubtractModification.class), |
74 |
| - @JsonSubTypes.Type(name = "BigIntegerXor", value = BigIntegerXorModification.class), |
75 |
| - @JsonSubTypes.Type( |
76 |
| - name = "BooleanExplicitValue", |
77 |
| - value = BooleanExplicitValueModification.class), |
78 |
| - @JsonSubTypes.Type(name = "BooleanToggle", value = BooleanToggleModification.class), |
79 |
| - @JsonSubTypes.Type( |
80 |
| - name = "ByteArrayAppendValue", |
81 |
| - value = ByteArrayAppendValueModification.class), |
82 |
| - @JsonSubTypes.Type(name = "ByteArrayDelete", value = ByteArrayDeleteModification.class), |
83 |
| - @JsonSubTypes.Type(name = "ByteArrayDuplicate", value = ByteArrayDuplicateModification.class), |
84 |
| - @JsonSubTypes.Type( |
85 |
| - name = "ByteArrayExplicitValue", |
86 |
| - value = ByteArrayExplicitValueModification.class), |
87 |
| - @JsonSubTypes.Type( |
88 |
| - name = "ByteArrayInsertValue", |
89 |
| - value = ByteArrayInsertValueModification.class), |
90 |
| - @JsonSubTypes.Type( |
91 |
| - name = "ByteArrayPrependValue", |
92 |
| - value = ByteArrayPrependValueModification.class), |
93 |
| - @JsonSubTypes.Type(name = "ByteArrayShuffle", value = ByteArrayShuffleModification.class), |
94 |
| - @JsonSubTypes.Type(name = "ByteArrayXor", value = ByteArrayXorModification.class), |
95 |
| - @JsonSubTypes.Type(name = "IntegerAdd", value = IntegerAddModification.class), |
96 |
| - @JsonSubTypes.Type( |
97 |
| - name = "IntegerExplicitValue", |
98 |
| - value = IntegerExplicitValueModification.class), |
99 |
| - @JsonSubTypes.Type(name = "IntegerMultiply", value = IntegerMultiplyModification.class), |
100 |
| - @JsonSubTypes.Type(name = "IntegerShiftLeft", value = IntegerShiftLeftModification.class), |
101 |
| - @JsonSubTypes.Type(name = "IntegerShiftRight", value = IntegerShiftRightModification.class), |
102 |
| - @JsonSubTypes.Type(name = "IntegerSubtract", value = IntegerSubtractModification.class), |
103 |
| - @JsonSubTypes.Type(name = "IntegerSwapEndian", value = IntegerSwapEndianModification.class), |
104 |
| - @JsonSubTypes.Type(name = "IntegerXor", value = IntegerXorModification.class), |
105 |
| - @JsonSubTypes.Type(name = "LongAdd", value = LongAddModification.class), |
106 |
| - @JsonSubTypes.Type(name = "LongExplicitValue", value = LongExplicitValueModification.class), |
107 |
| - @JsonSubTypes.Type(name = "LongMultiply", value = LongMultiplyModification.class), |
108 |
| - @JsonSubTypes.Type(name = "LongShiftLeft", value = LongShiftLeftModification.class), |
109 |
| - @JsonSubTypes.Type(name = "LongShiftRight", value = LongShiftRightModification.class), |
110 |
| - @JsonSubTypes.Type(name = "LongSubtract", value = LongSubtractModification.class), |
111 |
| - @JsonSubTypes.Type(name = "LongSwapEndian", value = LongSwapEndianModification.class), |
112 |
| - @JsonSubTypes.Type(name = "LongXor", value = LongXorModification.class), |
113 |
| - @JsonSubTypes.Type(name = "ByteAdd", value = ByteAddModification.class), |
114 |
| - @JsonSubTypes.Type(name = "ByteExplicitValue", value = ByteExplicitValueModification.class), |
115 |
| - @JsonSubTypes.Type(name = "ByteSubtract", value = ByteSubtractModification.class), |
116 |
| - @JsonSubTypes.Type(name = "ByteXor", value = ByteXorModification.class), |
117 |
| - @JsonSubTypes.Type(name = "StringAppendValue", value = StringAppendValueModification.class), |
118 |
| - @JsonSubTypes.Type(name = "StringDelete", value = StringDeleteModification.class), |
119 |
| - @JsonSubTypes.Type(name = "StringExplicitValue", value = StringExplicitValueModification.class), |
120 |
| - @JsonSubTypes.Type(name = "StringInsertValue", value = StringInsertValueModification.class), |
121 |
| - @JsonSubTypes.Type(name = "StringPrependValue", value = StringPrependValueModification.class), |
122 |
| -}) |
| 55 | +@JsonTypeInfo( |
| 56 | + use = JsonTypeInfo.Id.SIMPLE_NAME, |
| 57 | + include = JsonTypeInfo.As.PROPERTY, |
| 58 | + property = "@type") |
123 | 59 | @JsonAutoDetect(
|
124 | 60 | fieldVisibility = JsonAutoDetect.Visibility.ANY,
|
125 | 61 | getterVisibility = JsonAutoDetect.Visibility.NONE,
|
|
0 commit comments