@Nullable
    private static Map<String, AsyncProcessFunction<?, ?, ?, ?>> getThriftAsyncProcessMap(
            @Nullable Object service, Class<?> iface) {

        final String name = iface.getName();
        if (!name.endsWith("$AsyncIface")) {
            return null;
        }

        final String processorName = name.substring(0, name.length() - 10) + "AsyncProcessor";
        try {
            final Class<?> processorClass = Class.forName(processorName, false, iface.getClassLoader());
            if (!TBaseAsyncProcessor.class.isAssignableFrom(processorClass)) {
                return null;
            }

            final Constructor<?> processorConstructor = processorClass.getConstructor(iface);

            @SuppressWarnings("rawtypes")
            final TBaseAsyncProcessor processor =
                    (TBaseAsyncProcessor) processorConstructor.newInstance(service);

            @SuppressWarnings("unchecked")
            final Map<String, AsyncProcessFunction<?, ?, ?, ?>> processMap =
                    (Map<String, AsyncProcessFunction<?, ?, ?, ?>>) processor.getProcessMapView();

            return processMap;
        } catch (Exception e) {
            logger.debug("Failed to retrieve the asynchronous process map from:: {}", iface, e);
            return null;
        }
    }
Creates a new instance from a single Thrift service interface.
thrift/thrift0.21/src/main/java/com/linecorp/armeria/internal/common/thrift/ThriftServiceMetadata.java