| Constructor and Description |
|---|
Encoders() |
| Modifier and Type | Method and Description |
|---|---|
static <T extends Collection,B> |
arrayEncoder(Class<? extends Collection> arrayCls,
Class<B> elementType)
The underlying implementation uses array, only supported
Collection format, because
generic type such as List is erased to simply List, so a bean class input param is required. |
static <T extends Collection,B> |
arrayEncoder(TypeRef<? extends Collection> arrayToken,
TypeRef<B> elementType,
BinaryArrayWriter writer,
Fury fury)
Creates an encoder for Java Bean of type T.
|
static <T extends Collection> |
arrayEncoder(TypeRef<T> token)
Supported nested list format.
|
static <T extends Collection> |
arrayEncoder(TypeRef<T> token,
Fury fury) |
static <T> RowEncoder<T> |
bean(Class<T> beanClass) |
static <T> RowEncoder<T> |
bean(Class<T> beanClass,
BinaryRowWriter writer) |
static <T> RowEncoder<T> |
bean(Class<T> beanClass,
BinaryRowWriter writer,
Fury fury)
Creates an encoder for Java Bean of type T.
|
static <T> RowEncoder<T> |
bean(Class<T> beanClass,
Fury fury) |
static <T> RowEncoder<T> |
bean(Class<T> beanClass,
Fury fury,
int initialBufferSize) |
static <T> RowEncoder<T> |
bean(Class<T> beanClass,
int initialBufferSize) |
static Class<?> |
loadOrGenRowCodecClass(Class<?> beanClass) |
static <T extends Map,K,V> |
mapEncoder(Class<? extends Map> mapCls,
Class<K> keyType,
Class<V> valueType)
The underlying implementation uses array, only supported
Map format, because generic
type such as List is erased to simply List, so a bean class input param is required. |
static <T extends Map,K,V> |
mapEncoder(TypeRef<? extends Map> mapToken,
TypeRef<K> keyToken,
TypeRef<V> valToken,
Fury fury)
Creates an encoder for Java Bean of type T.
|
static <T extends Map> |
mapEncoder(TypeRef<T> token)
Supported nested map format.
|
static <T extends Map> |
mapEncoder(TypeRef<T> token,
Fury fury) |
public static <T> RowEncoder<T> bean(Class<T> beanClass)
public static <T> RowEncoder<T> bean(Class<T> beanClass, int initialBufferSize)
public static <T> RowEncoder<T> bean(Class<T> beanClass, Fury fury)
public static <T> RowEncoder<T> bean(Class<T> beanClass, Fury fury, int initialBufferSize)
public static <T> RowEncoder<T> bean(Class<T> beanClass, BinaryRowWriter writer)
public static <T> RowEncoder<T> bean(Class<T> beanClass, BinaryRowWriter writer, Fury fury)
T must be publicly accessible.
supported types for java bean field: - primitive types: boolean, int, double, etc. - boxed types: Boolean, Integer, Double, etc. - String - java.math.BigDecimal, java.math.BigInteger - time related: java.sql.Date, java.sql.Timestamp, java.time.LocalDate, java.time.Instant - collection types: only array and java.util.List currently, map support is in progress - nested java bean.
public static <T extends Collection> ArrayEncoder<T> arrayEncoder(TypeRef<T> token)
new TypeToken instance with Collection in Collection type.T - T is a array type, can be a nested list type.token - TypeToken instance which explicit specified the type.public static <T extends Collection> ArrayEncoder<T> arrayEncoder(TypeRef<T> token, Fury fury)
public static <T extends Collection,B> ArrayEncoder<T> arrayEncoder(Class<? extends Collection> arrayCls, Class<B> elementType)
Collection format, because
generic type such as List is erased to simply List, so a bean class input param is required.public static <T extends Collection,B> ArrayEncoder<T> arrayEncoder(TypeRef<? extends Collection> arrayToken, TypeRef<B> elementType, BinaryArrayWriter writer, Fury fury)
T must be publicly accessible.
supported types for java bean field: - primitive types: boolean, int, double, etc. - boxed types: Boolean, Integer, Double, etc. - String - java.math.BigDecimal, java.math.BigInteger - time related: java.sql.Date, java.sql.Timestamp, java.time.LocalDate, java.time.Instant - collection types: only array and java.util.List currently, map support is in progress - nested java bean.
public static <T extends Map> MapEncoder<T> mapEncoder(TypeRef<T> token)
new TypeToken instance with Collection in Collection type.T - T is a array type, can be a nested list type.token - TypeToken instance which explicit specified the type.public static <T extends Map,K,V> MapEncoder<T> mapEncoder(Class<? extends Map> mapCls, Class<K> keyType, Class<V> valueType)
Map format, because generic
type such as List is erased to simply List, so a bean class input param is required.public static <T extends Map> MapEncoder<T> mapEncoder(TypeRef<T> token, Fury fury)
public static <T extends Map,K,V> MapEncoder<T> mapEncoder(TypeRef<? extends Map> mapToken, TypeRef<K> keyToken, TypeRef<V> valToken, Fury fury)
T must be publicly accessible.
supported types for java bean field: - primitive types: boolean, int, double, etc. - boxed types: Boolean, Integer, Double, etc. - String - java.math.BigDecimal, java.math.BigInteger - time related: java.sql.Date, java.sql.Timestamp, java.time.LocalDate, java.time.Instant - collection types: only array and java.util.List currently, map support is in progress - nested java bean.
Copyright © 2023-2024, The Apache Software Foundation. Apache Fury™, Fury™, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.