Class ReflectionThriftUnionCodec<T>

java.lang.Object
io.airlift.drift.codec.internal.reflection.AbstractReflectionThriftCodec<T>
io.airlift.drift.codec.internal.reflection.ReflectionThriftUnionCodec<T>
All Implemented Interfaces:
ThriftCodec<T>

@Immutable public class ReflectionThriftUnionCodec<T> extends AbstractReflectionThriftCodec<T>
  • Constructor Details

  • Method Details

    • read

      public T read(TProtocolReader protocol) throws Exception
      Description copied from interface: ThriftCodec
      Reads 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

      public void write(T instance, TProtocolWriter protocol) throws Exception
      Description copied from interface: ThriftCodec
      Writes a value to the supplied Thrift protocol writer.
      Parameters:
      instance - the value to write; not null
      protocol - the protocol to write to
      Throws:
      Exception - if any problems occurred when writing or coercing the value