class ThriftSerDeUtils {

  static <E extends TFieldIdEnum, T extends TBase<?, ?>> E[] fields(Class<T> tClazz) {
    for (Class<?> clazz : tClazz.getDeclaredClasses()) {
      if (TFieldIdEnum.class.isAssignableFrom(clazz)) {
        return (E[]) clazz.getEnumConstants();
      }
    }
    return null;
  }

  private  ThriftSerDeUtils();

}