class DelegateCoder extends CustomCoder<T> {

  @Override
  public TypeDescriptor<T> getEncodedTypeDescriptor() {
    if (typeDescriptor == null) {
      return super.getEncodedTypeDescriptor();
    }
    return typeDescriptor;
  }

  protected  DelegateCoder(
      Coder<IntermediateT> coder,
      CodingFunction<T, IntermediateT> toFn,
      CodingFunction<IntermediateT, T> fromFn,
      @Nullable TypeDescriptor<T> typeDescriptor);

}