public class PrimitiveConverter<T> extends AvroTypeConverterWithStrictJavaTypeCheck<T>
AvroTypeConverter.Incompatible| Modifier and Type | Field and Description |
|---|---|
static AvroTypeConverter |
BOOLEAN |
static AvroTypeConverter |
BYTES |
static AvroTypeConverter |
DOUBLE |
static AvroTypeConverter |
FLOAT |
static AvroTypeConverter |
INT |
static AvroTypeConverter |
LONG |
static AvroTypeConverter |
STRING |
| Modifier | Constructor and Description |
|---|---|
protected |
PrimitiveConverter(org.apache.avro.Schema.Type avroType,
java.lang.Class<T> javaType,
java.util.function.Function<T,java.lang.Object> mapper) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canManage(org.apache.avro.Schema schema,
java.util.Deque<java.lang.String> path)
used to know if this class can convert the json value to the avro value
|
java.lang.Object |
convertValue(org.apache.avro.Schema.Field field,
org.apache.avro.Schema schema,
T value,
java.util.Deque<java.lang.String> path,
boolean silently) |
convertclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisLogicalTypepublic static final AvroTypeConverter BOOLEAN
public static final AvroTypeConverter STRING
public static final AvroTypeConverter INT
public static final AvroTypeConverter LONG
public static final AvroTypeConverter DOUBLE
public static final AvroTypeConverter FLOAT
public static final AvroTypeConverter BYTES
public java.lang.Object convertValue(org.apache.avro.Schema.Field field,
org.apache.avro.Schema schema,
T value,
java.util.Deque<java.lang.String> path,
boolean silently)
convertValue in class AvroTypeConverterWithStrictJavaTypeCheck<T>public boolean canManage(org.apache.avro.Schema schema,
java.util.Deque<java.lang.String> path)
AvroTypeConverterschema - the avro schema in which to convert the jsonpath - the path of the current field. Can be used to define a specific converter for a path