summaryrefslogtreecommitdiff
path: root/examples/15-transient-0/output/java/src
diff options
context:
space:
mode:
Diffstat (limited to 'examples/15-transient-0/output/java/src')
-rw-r--r--examples/15-transient-0/output/java/src/main/java/org/zwobble/example/types/data/transient0/HobgoblinTransient0Data.java41
1 files changed, 40 insertions, 1 deletions
diff --git a/examples/15-transient-0/output/java/src/main/java/org/zwobble/example/types/data/transient0/HobgoblinTransient0Data.java b/examples/15-transient-0/output/java/src/main/java/org/zwobble/example/types/data/transient0/HobgoblinTransient0Data.java
index 0044a4a..1eea54c 100644
--- a/examples/15-transient-0/output/java/src/main/java/org/zwobble/example/types/data/transient0/HobgoblinTransient0Data.java
+++ b/examples/15-transient-0/output/java/src/main/java/org/zwobble/example/types/data/transient0/HobgoblinTransient0Data.java
@@ -276,11 +276,13 @@ public final class HobgoblinTransient0Data {
public static void encodeStructWithGenericNative(org.zwobble.example.types.data.StructWithGenericNative value, java.io.OutputStream outputStream, java.util.Map<org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue, java.lang.Long> sharedValues) throws java.io.IOException {
org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeGenericNative(value.a(), outputStream, sharedValues, org.zwobble.example.types.transient0.HobgoblinTransient0Builtins::encodeInt32, org.zwobble.example.types.transient0.HobgoblinTransient0Builtins::encodeString);
+ org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeGenericNative(value.b(), outputStream, sharedValues, org.zwobble.example.types.data.transient0.HobgoblinTransient0Data::encode$constructedType$0, org.zwobble.example.types.data.transient0.HobgoblinTransient0Data::encode$constructedType$1);
}
public static org.zwobble.example.types.data.StructWithGenericNative decodeStructWithGenericNative(java.io.InputStream inputStream, java.util.List<java.lang.Object> sharedValues) throws java.io.IOException {
var a = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeGenericNative(inputStream, sharedValues, org.zwobble.example.types.transient0.HobgoblinTransient0Builtins::decodeInt32, org.zwobble.example.types.transient0.HobgoblinTransient0Builtins::decodeString);
- return new org.zwobble.example.types.data.StructWithGenericNative(a);
+ var b = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeGenericNative(inputStream, sharedValues, org.zwobble.example.types.data.transient0.HobgoblinTransient0Data::decode$constructedType$0, org.zwobble.example.types.data.transient0.HobgoblinTransient0Data::decode$constructedType$1);
+ return new org.zwobble.example.types.data.StructWithGenericNative(a, b);
}
public static void encodeStructWithBox(org.zwobble.example.types.data.StructWithBox value, java.io.OutputStream outputStream, java.util.Map<org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue, java.lang.Long> sharedValues) throws java.io.IOException {
@@ -498,6 +500,43 @@ public final class HobgoblinTransient0Data {
return new org.zwobble.example.types.data.StructWithSharedSumAndVariant(a, b);
}
+ private static void encode$constructedType$0(java.util.Optional<String> value, java.io.OutputStream outputStream, java.util.Map<org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue, java.lang.Long> sharedValues) throws java.io.IOException {
+ org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeBool(value.isPresent(), outputStream, sharedValues);
+ if (value.isPresent()) {
+ org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeString(value.get(), outputStream, sharedValues);
+ }
+ }
+
+ private static java.util.Optional<String> decode$constructedType$0(java.io.InputStream inputStream, java.util.List<java.lang.Object> sharedValues) throws java.io.IOException {
+ var value$isPresent = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeBool(inputStream, sharedValues);
+ java.util.Optional<String> value;
+ if (value$isPresent) {
+ var value$element = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeString(inputStream, sharedValues);
+ value = java.util.Optional.of(value$element);
+ } else {
+ value = java.util.Optional.empty();
+ }
+ return value;
+ }
+
+ private static void encode$constructedType$1(org.zwobble.example.types.data.GenericNative<java.util.Optional<String>, org.zwobble.example.types.data.GenericNative<String, String>> value, java.io.OutputStream outputStream, java.util.Map<org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue, java.lang.Long> sharedValues) throws java.io.IOException {
+ org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeGenericNative(value, outputStream, sharedValues, org.zwobble.example.types.data.transient0.HobgoblinTransient0Data::encode$constructedType$0, org.zwobble.example.types.data.transient0.HobgoblinTransient0Data::encode$constructedType$2);
+ }
+
+ private static org.zwobble.example.types.data.GenericNative<java.util.Optional<String>, org.zwobble.example.types.data.GenericNative<String, String>> decode$constructedType$1(java.io.InputStream inputStream, java.util.List<java.lang.Object> sharedValues) throws java.io.IOException {
+ var value = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeGenericNative(inputStream, sharedValues, org.zwobble.example.types.data.transient0.HobgoblinTransient0Data::decode$constructedType$0, org.zwobble.example.types.data.transient0.HobgoblinTransient0Data::decode$constructedType$2);
+ return value;
+ }
+
+ private static void encode$constructedType$2(org.zwobble.example.types.data.GenericNative<String, String> value, java.io.OutputStream outputStream, java.util.Map<org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue, java.lang.Long> sharedValues) throws java.io.IOException {
+ org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeGenericNative(value, outputStream, sharedValues, org.zwobble.example.types.transient0.HobgoblinTransient0Builtins::encodeString, org.zwobble.example.types.transient0.HobgoblinTransient0Builtins::encodeString);
+ }
+
+ private static org.zwobble.example.types.data.GenericNative<String, String> decode$constructedType$2(java.io.InputStream inputStream, java.util.List<java.lang.Object> sharedValues) throws java.io.IOException {
+ var value = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeGenericNative(inputStream, sharedValues, org.zwobble.example.types.transient0.HobgoblinTransient0Builtins::decodeString, org.zwobble.example.types.transient0.HobgoblinTransient0Builtins::decodeString);
+ return value;
+ }
+
// Custom area start: org.zwobble.example.types.data.transient0.HobgoblinTransient0Data body
public static void encodeNative(
Native value,