@Nullable
    @Override
    public DescriptiveTypeInfo newDescriptiveTypeInfo(Object typeDescriptor) {
        if (!(typeDescriptor instanceof Class)) {
            return null;
        }

        final Class<?> clazz = (Class<?>) typeDescriptor;
        if (TEnum.class.isAssignableFrom(clazz)) {
            @SuppressWarnings("unchecked")
            final Class<? extends Enum<? extends TEnum>> enumType =
                    (Class<? extends Enum<? extends TEnum>>) clazz;
            return newEnumInfo(enumType);
        }

        if (TException.class.isAssignableFrom(clazz)) {
            @SuppressWarnings("unchecked")
            final Class<? extends TException> castType = (Class<? extends TException>) clazz;
            return newExceptionInfo(castType);
        }

        if (TBase.class.isAssignableFrom(clazz)) {
            @SuppressWarnings("unchecked")
            final Class<? extends TBase<?, ?>> castType = (Class<? extends TBase<?, ?>>) clazz;
            return newStructInfo(castType);
        }

        return null;
    }
A {@link DescriptiveTypeInfoProvider} to create a {@link DescriptiveTypeInfo} from a Thrift type
such as {@link TBase} {@link TEnum} or {@link TException}.
thrift/thrift0.13/src/main/java/com/linecorp/armeria/internal/server/thrift/ThriftDescriptiveTypeInfoProvider.java