Interface DataClassInvokerGenerator.DataClassInstanceCreator
- Enclosing class:
- DataClassInvokerGenerator
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Represents a creator for an instance of a data class generated by this generator.
- Since:
- 4.0
-
Method Summary
Modifier and TypeMethodDescriptionmakeInstance(@NonNull DataBuf buf, @NonNull ObjectMapper context) Provides a new instance of the data class reading the required arguments from the given buffer, deserializing them using the given object mapper.
-
Method Details
-
makeInstance
@NonNull @NonNull Object makeInstance(@NonNull @NonNull DataBuf buf, @NonNull @NonNull ObjectMapper context) Provides a new instance of the data class reading the required arguments from the given buffer, deserializing them using the given object mapper.- Parameters:
buf- the buffer to read the arguments from.context- the object mapper from which the call came, used read the serialized arguments.- Returns:
- an instance of the underlying data class read from the given buffer.
- Throws:
NullPointerException- if either the given buffer or object mapper is null.
-