@ SuppressWarnings ( "unchecked" ) public static ThriftMetaData fromThriftClass ( Class < ? > thriftClass ) { if ( thriftClass != null && TBase . class . isAssignableFrom ( thriftClass ) ) { Class < ? extends TBase < ? , ? > > tClass = ( Class < ? extends TBase < ? , ? > > ) thriftClass ; StructType descriptor = new ThriftSchemaConverter ( ) . toStructType ( tClass ) ; return new ThriftMetaData ( thriftClass . getName ( ) , descriptor ) ; } return null ; }
Creates ThriftMetaData from a Thrift - generated class .