feat(serde-ext, weaver-pojo-serde-ext): Enable serde for woven string map entries
This commit is contained in:
+6
@@ -51,6 +51,12 @@ public class DefaultTweedEntryReaderWriterImplsProvider implements TweedReaderWr
|
||||
));
|
||||
context.registerReaderFactory("tweed5.collection", new StaticReaderWriterFactory<>(collectionReaderWriter()));
|
||||
context.registerWriterFactory("tweed5.collection", new StaticReaderWriterFactory<>(collectionReaderWriter()));
|
||||
context.registerReaderFactory("tweed5.mutatableStruct", new StaticReaderWriterFactory<>(
|
||||
mutableStructuredReaderWriter()
|
||||
));
|
||||
context.registerWriterFactory("tweed5.mutatableStruct", new StaticReaderWriterFactory<>(
|
||||
mutableStructuredReaderWriter()
|
||||
));
|
||||
context.registerReaderFactory("tweed5.compound", new StaticReaderWriterFactory<>(compoundReaderWriter()));
|
||||
context.registerWriterFactory("tweed5.compound", new StaticReaderWriterFactory<>(compoundReaderWriter()));
|
||||
}
|
||||
|
||||
+7
@@ -3,12 +3,14 @@ package de.siphalor.tweed5.weaver.pojoext.serde.api.auto;
|
||||
import de.siphalor.tweed5.annotationinheritance.api.AnnotationInheritance;
|
||||
import de.siphalor.tweed5.core.api.entry.CollectionConfigEntry;
|
||||
import de.siphalor.tweed5.core.api.entry.CompoundConfigEntry;
|
||||
import de.siphalor.tweed5.weaver.pojo.api.entry.WeavableStringMapConfigEntry;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
@AnnotationInheritance(passOn = AutoReadWriteMapping.class)
|
||||
@AutoReadWriteMapping(valueClasses = {boolean.class, Boolean.class}, spec = "tweed5.bool")
|
||||
@@ -30,6 +32,11 @@ import java.util.Collection;
|
||||
valueClasses = Object.class,
|
||||
spec = "tweed5.compound"
|
||||
)
|
||||
@AutoReadWriteMapping(
|
||||
entryClasses = WeavableStringMapConfigEntry.class,
|
||||
valueClasses = Map.class,
|
||||
spec = "tweed5.mutatableStruct"
|
||||
)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ElementType.FIELD, ElementType.TYPE, ElementType.ANNOTATION_TYPE})
|
||||
public @interface DefaultReadWriteMappings {
|
||||
|
||||
Reference in New Issue
Block a user