Class ObjectDecoder<T>
java.lang.Object
dev.siroshun.codec4j.api.decoder.object.ObjectDecoder<T>
- All Implemented Interfaces:
Decoder<T>
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T,F1, F2, F3, F4, F5, F6, F7, F8, F9, F10>
@NotNull ObjectDecoder<T> create(@NotNull dev.siroshun.jfun.function.Function10<F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, T> constructor, @NotNull FieldDecoder<F1> field1, @NotNull FieldDecoder<F2> field2, @NotNull FieldDecoder<F3> field3, @NotNull FieldDecoder<F4> field4, @NotNull FieldDecoder<F5> field5, @NotNull FieldDecoder<F6> field6, @NotNull FieldDecoder<F7> field7, @NotNull FieldDecoder<F8> field8, @NotNull FieldDecoder<F9> field9, @NotNull FieldDecoder<F10> field10) static <T,F1, F2, F3>
@NotNull ObjectDecoder<T> create(@NotNull dev.siroshun.jfun.function.Function3<F1, F2, F3, T> constructor, @NotNull FieldDecoder<F1> field1, @NotNull FieldDecoder<F2> field2, @NotNull FieldDecoder<F3> field3) static <T,F1, F2, F3, F4>
@NotNull ObjectDecoder<T> create(@NotNull dev.siroshun.jfun.function.Function4<F1, F2, F3, F4, T> constructor, @NotNull FieldDecoder<F1> field1, @NotNull FieldDecoder<F2> field2, @NotNull FieldDecoder<F3> field3, @NotNull FieldDecoder<F4> field4) static <T,F1, F2, F3, F4, F5>
@NotNull ObjectDecoder<T> create(@NotNull dev.siroshun.jfun.function.Function5<F1, F2, F3, F4, F5, T> constructor, @NotNull FieldDecoder<F1> field1, @NotNull FieldDecoder<F2> field2, @NotNull FieldDecoder<F3> field3, @NotNull FieldDecoder<F4> field4, @NotNull FieldDecoder<F5> field5) static <T,F1, F2, F3, F4, F5, F6>
@NotNull ObjectDecoder<T> create(@NotNull dev.siroshun.jfun.function.Function6<F1, F2, F3, F4, F5, F6, T> constructor, @NotNull FieldDecoder<F1> field1, @NotNull FieldDecoder<F2> field2, @NotNull FieldDecoder<F3> field3, @NotNull FieldDecoder<F4> field4, @NotNull FieldDecoder<F5> field5, @NotNull FieldDecoder<F6> field6) static <T,F1, F2, F3, F4, F5, F6, F7>
@NotNull ObjectDecoder<T> create(@NotNull dev.siroshun.jfun.function.Function7<F1, F2, F3, F4, F5, F6, F7, T> constructor, @NotNull FieldDecoder<F1> field1, @NotNull FieldDecoder<F2> field2, @NotNull FieldDecoder<F3> field3, @NotNull FieldDecoder<F4> field4, @NotNull FieldDecoder<F5> field5, @NotNull FieldDecoder<F6> field6, @NotNull FieldDecoder<F7> field7) static <T,F1, F2, F3, F4, F5, F6, F7, F8>
@NotNull ObjectDecoder<T> create(@NotNull dev.siroshun.jfun.function.Function8<F1, F2, F3, F4, F5, F6, F7, F8, T> constructor, @NotNull FieldDecoder<F1> field1, @NotNull FieldDecoder<F2> field2, @NotNull FieldDecoder<F3> field3, @NotNull FieldDecoder<F4> field4, @NotNull FieldDecoder<F5> field5, @NotNull FieldDecoder<F6> field6, @NotNull FieldDecoder<F7> field7, @NotNull FieldDecoder<F8> field8) static <T,F1, F2, F3, F4, F5, F6, F7, F8, F9>
@NotNull ObjectDecoder<T> create(@NotNull dev.siroshun.jfun.function.Function9<F1, F2, F3, F4, F5, F6, F7, F8, F9, T> constructor, @NotNull FieldDecoder<F1> field1, @NotNull FieldDecoder<F2> field2, @NotNull FieldDecoder<F3> field3, @NotNull FieldDecoder<F4> field4, @NotNull FieldDecoder<F5> field5, @NotNull FieldDecoder<F6> field6, @NotNull FieldDecoder<F7> field7, @NotNull FieldDecoder<F8> field8, @NotNull FieldDecoder<F9> field9) static <T,F1, F2>
@NotNull ObjectDecoder<T> create(@NotNull BiFunction<F1, F2, T> constructor, @NotNull FieldDecoder<F1> field1, @NotNull FieldDecoder<F2> field2) static <T,F1> @NotNull ObjectDecoder <T> create(@NotNull Function<F1, T> constructor, @NotNull FieldDecoder<F1> field1) @NotNull dev.siroshun.jfun.result.Result<T, DecodeError> Decodes the data from the providedIn.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.siroshun.codec4j.api.decoder.Decoder
catchError, flatMap, inspect, map, toListDecoder, toOptionalFieldDecoder, toRequiredFieldDecoder, toSetDecoder, toSetDecoder, toSupplyingFieldDecoder
-
Method Details
-
create
@Contract("_, _ -> new") @NotNull public static <T,F1> @NotNull ObjectDecoder<T> create(@NotNull @NotNull Function<F1, T> constructor, @NotNull @NotNull FieldDecoder<F1> field1) -
create
@Contract("_, _, _ -> new") @NotNull public static <T,F1, @NotNull ObjectDecoder<T> createF2> (@NotNull @NotNull BiFunction<F1, F2, T> constructor, @NotNull @NotNull FieldDecoder<F1> field1, @NotNull @NotNull FieldDecoder<F2> field2) -
create
@Contract("_, _, _, _ -> new") @NotNull public static <T,F1, @NotNull ObjectDecoder<T> createF2, F3> (@NotNull @NotNull dev.siroshun.jfun.function.Function3<F1, F2, F3, T> constructor, @NotNull @NotNull FieldDecoder<F1> field1, @NotNull @NotNull FieldDecoder<F2> field2, @NotNull @NotNull FieldDecoder<F3> field3) -
create
@Contract("_, _, _, _, _ -> new") @NotNull public static <T,F1, @NotNull ObjectDecoder<T> createF2, F3, F4> (@NotNull @NotNull dev.siroshun.jfun.function.Function4<F1, F2, F3, F4, T> constructor, @NotNull @NotNull FieldDecoder<F1> field1, @NotNull @NotNull FieldDecoder<F2> field2, @NotNull @NotNull FieldDecoder<F3> field3, @NotNull @NotNull FieldDecoder<F4> field4) -
create
@Contract("_, _, _, _, _, _ -> new") @NotNull public static <T,F1, @NotNull ObjectDecoder<T> createF2, F3, F4, F5> (@NotNull @NotNull dev.siroshun.jfun.function.Function5<F1, F2, F3, F4, F5, T> constructor, @NotNull @NotNull FieldDecoder<F1> field1, @NotNull @NotNull FieldDecoder<F2> field2, @NotNull @NotNull FieldDecoder<F3> field3, @NotNull @NotNull FieldDecoder<F4> field4, @NotNull @NotNull FieldDecoder<F5> field5) -
create
@Contract("_, _, _, _, _, _, _ -> new") @NotNull public static <T,F1, @NotNull ObjectDecoder<T> createF2, F3, F4, F5, F6> (@NotNull @NotNull dev.siroshun.jfun.function.Function6<F1, F2, F3, F4, F5, F6, T> constructor, @NotNull @NotNull FieldDecoder<F1> field1, @NotNull @NotNull FieldDecoder<F2> field2, @NotNull @NotNull FieldDecoder<F3> field3, @NotNull @NotNull FieldDecoder<F4> field4, @NotNull @NotNull FieldDecoder<F5> field5, @NotNull @NotNull FieldDecoder<F6> field6) -
create
@Contract("_, _, _, _, _, _, _, _ -> new") @NotNull public static <T,F1, @NotNull ObjectDecoder<T> createF2, F3, F4, F5, F6, F7> (@NotNull @NotNull dev.siroshun.jfun.function.Function7<F1, F2, F3, F4, F5, F6, F7, T> constructor, @NotNull @NotNull FieldDecoder<F1> field1, @NotNull @NotNull FieldDecoder<F2> field2, @NotNull @NotNull FieldDecoder<F3> field3, @NotNull @NotNull FieldDecoder<F4> field4, @NotNull @NotNull FieldDecoder<F5> field5, @NotNull @NotNull FieldDecoder<F6> field6, @NotNull @NotNull FieldDecoder<F7> field7) -
create
@Contract("_, _, _, _, _, _, _, _, _ -> new") @NotNull public static <T,F1, @NotNull ObjectDecoder<T> createF2, F3, F4, F5, F6, F7, F8> (@NotNull @NotNull dev.siroshun.jfun.function.Function8<F1, F2, F3, F4, F5, F6, F7, F8, T> constructor, @NotNull @NotNull FieldDecoder<F1> field1, @NotNull @NotNull FieldDecoder<F2> field2, @NotNull @NotNull FieldDecoder<F3> field3, @NotNull @NotNull FieldDecoder<F4> field4, @NotNull @NotNull FieldDecoder<F5> field5, @NotNull @NotNull FieldDecoder<F6> field6, @NotNull @NotNull FieldDecoder<F7> field7, @NotNull @NotNull FieldDecoder<F8> field8) -
create
@Contract("_, _, _, _, _, _, _, _, _, _ -> new") @NotNull public static <T,F1, @NotNull ObjectDecoder<T> createF2, F3, F4, F5, F6, F7, F8, F9> (@NotNull @NotNull dev.siroshun.jfun.function.Function9<F1, F2, F3, F4, F5, F6, F7, F8, F9, T> constructor, @NotNull @NotNull FieldDecoder<F1> field1, @NotNull @NotNull FieldDecoder<F2> field2, @NotNull @NotNull FieldDecoder<F3> field3, @NotNull @NotNull FieldDecoder<F4> field4, @NotNull @NotNull FieldDecoder<F5> field5, @NotNull @NotNull FieldDecoder<F6> field6, @NotNull @NotNull FieldDecoder<F7> field7, @NotNull @NotNull FieldDecoder<F8> field8, @NotNull @NotNull FieldDecoder<F9> field9) -
create
@Contract("_, _, _, _, _, _, _, _, _, _, _ -> new") @NotNull public static <T,F1, @NotNull ObjectDecoder<T> createF2, F3, F4, F5, F6, F7, F8, F9, F10> (@NotNull @NotNull dev.siroshun.jfun.function.Function10<F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, T> constructor, @NotNull @NotNull FieldDecoder<F1> field1, @NotNull @NotNull FieldDecoder<F2> field2, @NotNull @NotNull FieldDecoder<F3> field3, @NotNull @NotNull FieldDecoder<F4> field4, @NotNull @NotNull FieldDecoder<F5> field5, @NotNull @NotNull FieldDecoder<F6> field6, @NotNull @NotNull FieldDecoder<F7> field7, @NotNull @NotNull FieldDecoder<F8> field8, @NotNull @NotNull FieldDecoder<F9> field9, @NotNull @NotNull FieldDecoder<F10> field10) -
decode
@NotNull public @NotNull dev.siroshun.jfun.result.Result<T,DecodeError> decode(@NotNull @NotNull In in) Description copied from interface:DecoderDecodes the data from the providedIn.- Specified by:
decodein interfaceDecoder<T>- Parameters:
in- theInfor reading the data to decode- Returns:
- a result containing the decoded data, or a
DecodeErrorif the operation failed
-