Modifier and Type | Method and Description |
---|---|
SdkField<TypeT> |
build() |
SdkField.Builder<TypeT> |
constructor(Supplier<SdkPojo> constructor)
Sets a
Supplier which will create a new MUTABLE instance of the POJO. |
SdkField.Builder<TypeT> |
getter(Function<Object,TypeT> getter)
Sets the
Function that will accept an object and return the current value of 'this' field on that object. |
SdkField.Builder<TypeT> |
memberName(String memberName) |
SdkField.Builder<TypeT> |
setter(BiConsumer<Object,TypeT> setter)
Sets the
BiConsumer which will accept an object and a value and set that value on the appropriate
member of the object. |
SdkField.Builder<TypeT> |
traits(Trait... traits)
Attaches one or more traits to the
SdkField . |
public SdkField.Builder<TypeT> memberName(String memberName)
public SdkField.Builder<TypeT> constructor(Supplier<SdkPojo> constructor)
Supplier
which will create a new MUTABLE instance of the POJO. I.E. this will
create the Builder for a given POJO and not the immutable POJO itself.constructor
- Supplier method to create the mutable POJO.public SdkField.Builder<TypeT> setter(BiConsumer<Object,TypeT> setter)
BiConsumer
which will accept an object and a value and set that value on the appropriate
member of the object. This requires a MUTABLE pojo so thus this setter will be on the Builder
for the given POJO.setter
- Setter method.public SdkField.Builder<TypeT> getter(Function<Object,TypeT> getter)
Function
that will accept an object and return the current value of 'this' field on that object.
This will typically be a getter on the immutable representation of the POJO and is used mostly during marshalling.getter
- Getter method.public SdkField.Builder<TypeT> traits(Trait... traits)
SdkField
. Traits can have additional metadata and behavior that
influence how a field is marshalled/unmarshalled.traits
- Traits to attach.Copyright © 2021. All rights reserved.