@SuppressWarnings("unchecked")
  static <T> ReadSupport<T> getReadSupportInstance(
      Class<? extends ReadSupport<T>> readSupportClass){
    try {
      return readSupportClass.newInstance();
    } catch (InstantiationException e) {
      throw new BadConfigurationException("could not instantiate read support class", e);
    } catch (IllegalAccessException e) {
      throw new BadConfigurationException("could not instantiate read support class", e);
    }
  }
@ SuppressWarnings ( "unchecked" ) static < T > ReadSupport < T > getReadSupportInstance ( Class < ? extends ReadSupport < T > > readSupportClass ) { try { return readSupportClass . newInstance ( ) ; } catch ( InstantiationException e ) { throw new BadConfigurationException ( "could not instantiate read support class" , e ) ; } catch ( IllegalAccessException e ) { throw new BadConfigurationException ( "could not instantiate read support class" , e ) ; } }
@param readSupportClass to instantiate
@param <T> the Java type of objects created by the ReadSupport
@return the configured read support