public class AutoBeanCodex
extends java.lang.Object
Constructor and Description |
---|
AutoBeanCodex() |
Modifier and Type | Method and Description |
---|---|
static <T> AutoBean<T> |
decode(AutoBeanFactory factory,
java.lang.Class<T> clazz,
Splittable data)
Decode an AutoBeanCodex payload.
|
static <T> AutoBean<T> |
decode(AutoBeanFactory factory,
java.lang.Class<T> clazz,
java.lang.String payload)
Decode an AutoBeanCodex payload.
|
static void |
decodeInto(Splittable data,
AutoBean<?> bean)
Copy data from a
Splittable into an AutoBean. |
static Splittable |
encode(AutoBean<?> bean)
Encodes an AutoBean.
|
public static <T> AutoBean<T> decode(AutoBeanFactory factory, java.lang.Class<T> clazz, Splittable data)
T
- the expected return typefactory
- an AutoBeanFactory capable of producing AutoBean<T>
clazz
- the expected return typedata
- a payload previously generated by encode(AutoBean)
public static <T> AutoBean<T> decode(AutoBeanFactory factory, java.lang.Class<T> clazz, java.lang.String payload)
T
- the expected return typefactory
- an AutoBeanFactory capable of producing AutoBean<T>
clazz
- the expected return typepayload
- a payload string previously generated by
encode(AutoBean)
.getPayload()
.public static void decodeInto(Splittable data, AutoBean<?> bean)
Splittable
into an AutoBean. Unset values in the
Splittable will not nullify data that already exists in the AutoBean.data
- the source data to copybean
- the target AutoBeanpublic static Splittable encode(AutoBean<?> bean)
Splittable.getPayload()
.bean
- the bean to encode