Class ReflectionThriftStructCodec<T>
java.lang.Object
io.airlift.drift.codec.internal.reflection.AbstractReflectionThriftCodec<T>
io.airlift.drift.codec.internal.reflection.ReflectionThriftStructCodec<T>
- All Implemented Interfaces:
ThriftCodec<T>
-
Field Summary
Fields inherited from class io.airlift.drift.codec.internal.reflection.AbstractReflectionThriftCodec
fields, metadata -
Constructor Summary
ConstructorsConstructorDescriptionReflectionThriftStructCodec(ThriftCodecManager manager, ThriftStructMetadata metadata) -
Method Summary
Modifier and TypeMethodDescriptionread(TProtocolReader protocol) Reads a value from supplied Thrift protocol reader.voidwrite(T instance, TProtocolWriter protocol) Writes a value to the supplied Thrift protocol writer.Methods inherited from class io.airlift.drift.codec.internal.reflection.AbstractReflectionThriftCodec
getFieldValue, getTypeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.airlift.drift.codec.ThriftCodec
isNull
-
Constructor Details
-
ReflectionThriftStructCodec
-
-
Method Details
-
read
Description copied from interface:ThriftCodecReads a value from supplied Thrift protocol reader.- Parameters:
protocol- the protocol to read from- Returns:
- the value; not null
- Throws:
Exception- if any problems occurred when reading or coercing the value
-
write
Description copied from interface:ThriftCodecWrites a value to the supplied Thrift protocol writer.- Parameters:
instance- the value to write; not nullprotocol- the protocol to write to- Throws:
Exception- if any problems occurred when writing or coercing the value
-