Uses of Interface
io.activej.codec.StructuredCodec
| Package | Description |
|---|---|
| io.activej.codec | |
| io.activej.codec.json | |
| io.activej.codec.registry |
-
Uses of StructuredCodec in io.activej.codec
Classes in io.activej.codec that implement StructuredCodec Modifier and Type Class Description classCodecSubtype<T>This is acodecthat stores subtypes of T with different codecs as a tagged union with string tags.Fields in io.activej.codec declared as StructuredCodec Modifier and Type Field Description static StructuredCodec<Boolean>StructuredCodecs. BOOLEAN_CODECstatic StructuredCodec<Byte>StructuredCodecs. BYTE_CODECstatic StructuredCodec<byte[]>StructuredCodecs. BYTES_CODECstatic StructuredCodec<Character>StructuredCodecs. CHARACTER_CODECstatic StructuredCodec<Class<?>>StructuredCodecs. CLASS_CODECstatic StructuredCodec<Double>StructuredCodecs. DOUBLE_CODECstatic StructuredCodec<Float>StructuredCodecs. FLOAT_CODECstatic StructuredCodec<Integer>StructuredCodecs. INT_CODECstatic StructuredCodec<Integer>StructuredCodecs. INT32_CODECstatic StructuredCodec<Long>StructuredCodecs. LONG_CODECstatic StructuredCodec<Long>StructuredCodecs. LONG64_CODECstatic StructuredCodec<Short>StructuredCodecs. SHORT_CODECstatic StructuredCodec<String>StructuredCodecs. STRING_CODECstatic StructuredCodec<Void>StructuredCodecs. VOID_CODECMethods in io.activej.codec that return StructuredCodec Modifier and Type Method Description static <T> StructuredCodec<List<T>>StructuredCodecs. concat(StructuredCodec<? extends T>... elementCodecs)static <T> StructuredCodec<List<T>>StructuredCodecs. concat(List<StructuredCodec<? extends T>> elementCodecs)Combinator codec that writes/reads a heterogeneous list using codecs from given list without list boundariesdefault StructuredCodec<@Nullable T>StructuredCodec. nullable()static <R> StructuredCodec<R>StructuredCodecs. object(TupleDecoder0<R> constructor)A DSL to callStructuredCodecs.ofObjectMap(Map)with fixed number of key-value pairs and map it to some result type R.static <R, T1> StructuredCodec<R>StructuredCodecs. object(TupleDecoder1<T1,R> constructor, String field1, Function<R,T1> getter1, StructuredCodec<T1> codec1)A DSL to callStructuredCodecs.ofObjectMap(Map)with fixed number of key-value pairs and map it to some result type R.static <R, T1, T2> StructuredCodec<R>StructuredCodecs. object(TupleDecoder2<T1,T2,R> constructor, String field1, Function<R,T1> getter1, StructuredCodec<T1> codec1, String field2, Function<R,T2> getter2, StructuredCodec<T2> codec2)A DSL to callStructuredCodecs.ofObjectMap(Map)with fixed number of key-value pairs and map it to some result type R.static <R, T1, T2, T3>
StructuredCodec<R>StructuredCodecs. object(TupleDecoder3<T1,T2,T3,R> constructor, String field1, Function<R,T1> getter1, StructuredCodec<T1> codec1, String field2, Function<R,T2> getter2, StructuredCodec<T2> codec2, String field3, Function<R,T3> getter3, StructuredCodec<T3> codec3)A DSL to callStructuredCodecs.ofObjectMap(Map)with fixed number of key-value pairs and map it to some result type R.static <R, T1, T2, T3, T4>
StructuredCodec<R>StructuredCodecs. object(TupleDecoder4<T1,T2,T3,T4,R> constructor, String field1, Function<R,T1> getter1, StructuredCodec<T1> codec1, String field2, Function<R,T2> getter2, StructuredCodec<T2> codec2, String field3, Function<R,T3> getter3, StructuredCodec<T3> codec3, String field4, Function<R,T4> getter4, StructuredCodec<T4> codec4)A DSL to callStructuredCodecs.ofObjectMap(Map)with fixed number of key-value pairs and map it to some result type R.static <R, T1, T2, T3, T4, T5>
StructuredCodec<R>StructuredCodecs. object(TupleDecoder5<T1,T2,T3,T4,T5,R> constructor, String field1, Function<R,T1> getter1, StructuredCodec<T1> codec1, String field2, Function<R,T2> getter2, StructuredCodec<T2> codec2, String field3, Function<R,T3> getter3, StructuredCodec<T3> codec3, String field4, Function<R,T4> getter4, StructuredCodec<T4> codec4, String field5, Function<R,T5> getter5, StructuredCodec<T5> codec5)A DSL to callStructuredCodecs.ofObjectMap(Map)with fixed number of key-value pairs and map it to some result type R.static <R, T1, T2, T3, T4, T5, T6>
StructuredCodec<R>StructuredCodecs. object(TupleDecoder6<T1,T2,T3,T4,T5,T6,R> constructor, String field1, Function<R,T1> getter1, StructuredCodec<T1> codec1, String field2, Function<R,T2> getter2, StructuredCodec<T2> codec2, String field3, Function<R,T3> getter3, StructuredCodec<T3> codec3, String field4, Function<R,T4> getter4, StructuredCodec<T4> codec4, String field5, Function<R,T5> getter5, StructuredCodec<T5> codec5, String field6, Function<R,T6> getter6, StructuredCodec<T6> codec6)A DSL to callStructuredCodecs.ofObjectMap(Map)with fixed number of key-value pairs and map it to some result type R.static <T> StructuredCodec<T>StructuredCodec. of(StructuredDecoder<T> decoder, StructuredEncoder<T> encoder)static <T> StructuredCodec<Class<? extends T>>StructuredCodecs. ofClass()static <E extends Enum<E>>
StructuredCodec<E>StructuredCodecs. ofEnum(Class<E> enumType)default StructuredCodec<List<T>>StructuredCodec. ofList()static <T> StructuredCodec<List<T>>StructuredCodecs. ofList(StructuredCodec<T> valueAdapters)Combinator codec that writes/reads a list of T with given codec for Tstatic <K, V> StructuredCodec<Map<K,V>>StructuredCodecs. ofMap(StructuredCodec<K> codecKey, StructuredCodec<V> codecValue)Combinator codec that writes/reads a map with keys of type K and values of type V with given codecs for K and Vstatic <T> StructuredCodec<@Nullable T>StructuredCodecs. ofNullable(StructuredCodec<T> codec)static <T> StructuredCodec<T>StructuredCodec. ofObject(StructuredDecoder<T> decoder, StructuredEncoder<T> encoder)static <T> StructuredCodec<T>StructuredCodec. ofObject(Supplier<T> supplier)static <T> StructuredCodec<Map<String,T>>StructuredCodecs. ofObjectMap(Map<String,StructuredCodec<? extends T>> fieldCodecs)Combinator codec that writes/reads a heterogeneous map with string keys and values using codecs from given mapstatic <T> StructuredCodec<Optional<T>>StructuredCodecs. ofOptional(StructuredCodec<T> codec)Combinator codec that writes/reads Optional<T> as nullable T with given codec for Tstatic <T> StructuredCodec<Set<T>>StructuredCodecs. ofSet(StructuredCodec<T> codec)Combinator codec that writes/reads a set of T with given codec for Tstatic <T> StructuredCodec<T>StructuredCodec. ofTuple(StructuredDecoder<T> decoder, StructuredEncoder<T> encoder)static StructuredCodec<Object[]>StructuredCodecs. ofTupleArray(StructuredCodec<?>... elementDecoders)Combinator codec that writes/reads a heterogeneous fixed-size array ob objects with given codecsstatic StructuredCodec<Object[]>StructuredCodecs. ofTupleArray(List<StructuredCodec<?>> codecs)static <T> StructuredCodec<List<T>>StructuredCodecs. ofTupleList(StructuredCodec<? extends T>... elementDecoders)static <T> StructuredCodec<List<T>>StructuredCodecs. ofTupleList(List<StructuredCodec<? extends T>> codecs)default <R> StructuredCodec<R>StructuredCodec. transform(DecoderFunction<T,R> reader, Function<R,T> writer)static <T, R> StructuredCodec<R>StructuredCodecs. transform(StructuredCodec<T> codec, DecoderFunction<T,R> reader, Function<R,T> writer)static <R> StructuredCodec<R>StructuredCodecs. tuple(TupleDecoder0<R> constructor)A DSL to callStructuredCodecs.ofTupleList(List)with fixed number of arguments and map it to some result type Rstatic <R, T1> StructuredCodec<R>StructuredCodecs. tuple(TupleDecoder1<T1,R> constructor, Function<R,T1> getter1, StructuredCodec<T1> codec1)A DSL to callStructuredCodecs.ofTupleList(List)with fixed number of arguments and map it to some result type Rstatic <R, T1, T2> StructuredCodec<R>StructuredCodecs. tuple(TupleDecoder2<T1,T2,R> constructor, Function<R,T1> getter1, StructuredCodec<T1> codec1, Function<R,T2> getter2, StructuredCodec<T2> codec2)A DSL to callStructuredCodecs.ofTupleList(List)with fixed number of arguments and map it to some result type Rstatic <R, T1, T2, T3>
StructuredCodec<R>StructuredCodecs. tuple(TupleDecoder3<T1,T2,T3,R> constructor, Function<R,T1> getter1, StructuredCodec<T1> codec1, Function<R,T2> getter2, StructuredCodec<T2> codec2, Function<R,T3> getter3, StructuredCodec<T3> codec3)A DSL to callStructuredCodecs.ofTupleList(List)with fixed number of arguments and map it to some result type Rstatic <R, T1, T2, T3, T4>
StructuredCodec<R>StructuredCodecs. tuple(TupleDecoder4<T1,T2,T3,T4,R> constructor, Function<R,T1> getter1, StructuredCodec<T1> codec1, Function<R,T2> getter2, StructuredCodec<T2> codec2, Function<R,T3> getter3, StructuredCodec<T3> codec3, Function<R,T4> getter4, StructuredCodec<T4> codec4)A DSL to callStructuredCodecs.ofTupleList(List)with fixed number of arguments and map it to some result type Rstatic <R, T1, T2, T3, T4, T5>
StructuredCodec<R>StructuredCodecs. tuple(TupleDecoder5<T1,T2,T3,T4,T5,R> constructor, Function<R,T1> getter1, StructuredCodec<T1> codec1, Function<R,T2> getter2, StructuredCodec<T2> codec2, Function<R,T3> getter3, StructuredCodec<T3> codec3, Function<R,T4> getter4, StructuredCodec<T4> codec4, Function<R,T5> getter5, StructuredCodec<T5> codec5)A DSL to callStructuredCodecs.ofTupleList(List)with fixed number of arguments and map it to some result type Rstatic <R, T1, T2, T3, T4, T5, T6>
StructuredCodec<R>StructuredCodecs. tuple(TupleDecoder6<T1,T2,T3,T4,T5,T6,R> constructor, Function<R,T1> getter1, StructuredCodec<T1> codec1, Function<R,T2> getter2, StructuredCodec<T2> codec2, Function<R,T3> getter3, StructuredCodec<T3> codec3, Function<R,T4> getter4, StructuredCodec<T4> codec4, Function<R,T5> getter5, StructuredCodec<T5> codec5, Function<R,T6> getter6, StructuredCodec<T6> codec6)A DSL to callStructuredCodecs.ofTupleList(List)with fixed number of arguments and map it to some result type RMethods in io.activej.codec with parameters of type StructuredCodec Modifier and Type Method Description static <T> StructuredCodec<List<T>>StructuredCodecs. concat(StructuredCodec<? extends T>... elementCodecs)static <R, T1> StructuredCodec<R>StructuredCodecs. object(TupleDecoder1<T1,R> constructor, String field1, Function<R,T1> getter1, StructuredCodec<T1> codec1)A DSL to callStructuredCodecs.ofObjectMap(Map)with fixed number of key-value pairs and map it to some result type R.static <R, T1, T2> StructuredCodec<R>StructuredCodecs. object(TupleDecoder2<T1,T2,R> constructor, String field1, Function<R,T1> getter1, StructuredCodec<T1> codec1, String field2, Function<R,T2> getter2, StructuredCodec<T2> codec2)A DSL to callStructuredCodecs.ofObjectMap(Map)with fixed number of key-value pairs and map it to some result type R.static <R, T1, T2, T3>
StructuredCodec<R>StructuredCodecs. object(TupleDecoder3<T1,T2,T3,R> constructor, String field1, Function<R,T1> getter1, StructuredCodec<T1> codec1, String field2, Function<R,T2> getter2, StructuredCodec<T2> codec2, String field3, Function<R,T3> getter3, StructuredCodec<T3> codec3)A DSL to callStructuredCodecs.ofObjectMap(Map)with fixed number of key-value pairs and map it to some result type R.static <R, T1, T2, T3, T4>
StructuredCodec<R>StructuredCodecs. object(TupleDecoder4<T1,T2,T3,T4,R> constructor, String field1, Function<R,T1> getter1, StructuredCodec<T1> codec1, String field2, Function<R,T2> getter2, StructuredCodec<T2> codec2, String field3, Function<R,T3> getter3, StructuredCodec<T3> codec3, String field4, Function<R,T4> getter4, StructuredCodec<T4> codec4)A DSL to callStructuredCodecs.ofObjectMap(Map)with fixed number of key-value pairs and map it to some result type R.static <R, T1, T2, T3, T4, T5>
StructuredCodec<R>StructuredCodecs. object(TupleDecoder5<T1,T2,T3,T4,T5,R> constructor, String field1, Function<R,T1> getter1, StructuredCodec<T1> codec1, String field2, Function<R,T2> getter2, StructuredCodec<T2> codec2, String field3, Function<R,T3> getter3, StructuredCodec<T3> codec3, String field4, Function<R,T4> getter4, StructuredCodec<T4> codec4, String field5, Function<R,T5> getter5, StructuredCodec<T5> codec5)A DSL to callStructuredCodecs.ofObjectMap(Map)with fixed number of key-value pairs and map it to some result type R.static <R, T1, T2, T3, T4, T5, T6>
StructuredCodec<R>StructuredCodecs. object(TupleDecoder6<T1,T2,T3,T4,T5,T6,R> constructor, String field1, Function<R,T1> getter1, StructuredCodec<T1> codec1, String field2, Function<R,T2> getter2, StructuredCodec<T2> codec2, String field3, Function<R,T3> getter3, StructuredCodec<T3> codec3, String field4, Function<R,T4> getter4, StructuredCodec<T4> codec4, String field5, Function<R,T5> getter5, StructuredCodec<T5> codec5, String field6, Function<R,T6> getter6, StructuredCodec<T6> codec6)A DSL to callStructuredCodecs.ofObjectMap(Map)with fixed number of key-value pairs and map it to some result type R.static <T> StructuredCodec<List<T>>StructuredCodecs. ofList(StructuredCodec<T> valueAdapters)Combinator codec that writes/reads a list of T with given codec for Tstatic <K, V> StructuredCodec<Map<K,V>>StructuredCodecs. ofMap(StructuredCodec<K> codecKey, StructuredCodec<V> codecValue)Combinator codec that writes/reads a map with keys of type K and values of type V with given codecs for K and Vstatic <T> StructuredCodec<@Nullable T>StructuredCodecs. ofNullable(StructuredCodec<T> codec)static <T> StructuredCodec<Optional<T>>StructuredCodecs. ofOptional(StructuredCodec<T> codec)Combinator codec that writes/reads Optional<T> as nullable T with given codec for Tstatic <T> StructuredCodec<Set<T>>StructuredCodecs. ofSet(StructuredCodec<T> codec)Combinator codec that writes/reads a set of T with given codec for Tstatic StructuredCodec<Object[]>StructuredCodecs. ofTupleArray(StructuredCodec<?>... elementDecoders)Combinator codec that writes/reads a heterogeneous fixed-size array ob objects with given codecsstatic <T> StructuredCodec<List<T>>StructuredCodecs. ofTupleList(StructuredCodec<? extends T>... elementDecoders)static <T, R> StructuredCodec<R>StructuredCodecs. transform(StructuredCodec<T> codec, DecoderFunction<T,R> reader, Function<R,T> writer)static <R, T1> StructuredCodec<R>StructuredCodecs. tuple(TupleDecoder1<T1,R> constructor, Function<R,T1> getter1, StructuredCodec<T1> codec1)A DSL to callStructuredCodecs.ofTupleList(List)with fixed number of arguments and map it to some result type Rstatic <R, T1, T2> StructuredCodec<R>StructuredCodecs. tuple(TupleDecoder2<T1,T2,R> constructor, Function<R,T1> getter1, StructuredCodec<T1> codec1, Function<R,T2> getter2, StructuredCodec<T2> codec2)A DSL to callStructuredCodecs.ofTupleList(List)with fixed number of arguments and map it to some result type Rstatic <R, T1, T2, T3>
StructuredCodec<R>StructuredCodecs. tuple(TupleDecoder3<T1,T2,T3,R> constructor, Function<R,T1> getter1, StructuredCodec<T1> codec1, Function<R,T2> getter2, StructuredCodec<T2> codec2, Function<R,T3> getter3, StructuredCodec<T3> codec3)A DSL to callStructuredCodecs.ofTupleList(List)with fixed number of arguments and map it to some result type Rstatic <R, T1, T2, T3, T4>
StructuredCodec<R>StructuredCodecs. tuple(TupleDecoder4<T1,T2,T3,T4,R> constructor, Function<R,T1> getter1, StructuredCodec<T1> codec1, Function<R,T2> getter2, StructuredCodec<T2> codec2, Function<R,T3> getter3, StructuredCodec<T3> codec3, Function<R,T4> getter4, StructuredCodec<T4> codec4)A DSL to callStructuredCodecs.ofTupleList(List)with fixed number of arguments and map it to some result type Rstatic <R, T1, T2, T3, T4, T5>
StructuredCodec<R>StructuredCodecs. tuple(TupleDecoder5<T1,T2,T3,T4,T5,R> constructor, Function<R,T1> getter1, StructuredCodec<T1> codec1, Function<R,T2> getter2, StructuredCodec<T2> codec2, Function<R,T3> getter3, StructuredCodec<T3> codec3, Function<R,T4> getter4, StructuredCodec<T4> codec4, Function<R,T5> getter5, StructuredCodec<T5> codec5)A DSL to callStructuredCodecs.ofTupleList(List)with fixed number of arguments and map it to some result type Rstatic <R, T1, T2, T3, T4, T5, T6>
StructuredCodec<R>StructuredCodecs. tuple(TupleDecoder6<T1,T2,T3,T4,T5,T6,R> constructor, Function<R,T1> getter1, StructuredCodec<T1> codec1, Function<R,T2> getter2, StructuredCodec<T2> codec2, Function<R,T3> getter3, StructuredCodec<T3> codec3, Function<R,T4> getter4, StructuredCodec<T4> codec4, Function<R,T5> getter5, StructuredCodec<T5> codec5, Function<R,T6> getter6, StructuredCodec<T6> codec6)A DSL to callStructuredCodecs.ofTupleList(List)with fixed number of arguments and map it to some result type RCodecSubtype<T>CodecSubtype. with(Type type, StructuredCodec<? extends T> adapter)Add a subtype along with its codec and string tag which is extracted from the class nameCodecSubtype<T>CodecSubtype. with(Type type, String name, StructuredCodec<? extends T> adapter)Add a subtype along with its codec and custom string tagMethod parameters in io.activej.codec with type arguments of type StructuredCodec Modifier and Type Method Description static <T> StructuredCodec<List<T>>StructuredCodecs. concat(List<StructuredCodec<? extends T>> elementCodecs)Combinator codec that writes/reads a heterogeneous list using codecs from given list without list boundariesstatic <T> StructuredCodec<Map<String,T>>StructuredCodecs. ofObjectMap(Map<String,StructuredCodec<? extends T>> fieldCodecs)Combinator codec that writes/reads a heterogeneous map with string keys and values using codecs from given mapstatic StructuredCodec<Object[]>StructuredCodecs. ofTupleArray(List<StructuredCodec<?>> codecs)static <T> StructuredCodec<List<T>>StructuredCodecs. ofTupleList(List<StructuredCodec<? extends T>> codecs) -
Uses of StructuredCodec in io.activej.codec.json
Methods in io.activej.codec.json that return StructuredCodec Modifier and Type Method Description static <T> StructuredCodec<T>JsonUtils. indent(StructuredCodec<T> codec, String indent)static <T> StructuredCodec<T>JsonUtils. oneline(StructuredCodec<T> codec)Methods in io.activej.codec.json with parameters of type StructuredCodec Modifier and Type Method Description static <T> StructuredCodec<T>JsonUtils. indent(StructuredCodec<T> codec, String indent)static <T> StructuredCodec<T>JsonUtils. oneline(StructuredCodec<T> codec) -
Uses of StructuredCodec in io.activej.codec.registry
Methods in io.activej.codec.registry that return StructuredCodec Modifier and Type Method Description default <T> StructuredCodec<T>CodecFactory. get(TypeT<T> type)default <T> StructuredCodec<T>CodecFactory. get(Class<T> type)<T> StructuredCodec<T>CodecFactory. get(Type type)<T> StructuredCodec<T>CodecRegistry. get(Type type)Methods in io.activej.codec.registry with parameters of type StructuredCodec Modifier and Type Method Description <T> CodecRegistryCodecRegistry. with(Class<T> type, StructuredCodec<T> codec)Method parameters in io.activej.codec.registry with type arguments of type StructuredCodec Modifier and Type Method Description <T> CodecRegistryCodecRegistry. with(Class<T> type, Function<CodecFactory,StructuredCodec<T>> codec)<T> CodecRegistryCodecRegistry. withGeneric(Class<T> type, BiFunction<CodecFactory,StructuredCodec<Object>[],StructuredCodec<? extends T>> fn)