code: public static <M extends TBase<?, ?>> TypeRef<M> getTypeRef(Class<?> tClass) {
      verifyAncestry(tClass);
      return new TypeRef<M>(tClass){};
    }
docs: returns TypeRef for thrift class. Verifies that the class is
  a Thrift class (i.e extends TBase).