class LocalReactiveServiceCallerImpl implements LocalReactiveServiceCaller, ReactiveServiceDiscovery {

    public ReactiveServiceInterface createReactiveServiceInterface(String group, String version,
                                                                   String serviceFullName, Class<?> javaInterface) {
        ReactiveServiceInterface serviceInterface = new ReactiveServiceInterface();
        serviceInterface.setGroup(group);
        serviceInterface.setVersion(version);
        serviceInterface.setNamespace(javaInterface.getPackage().getName());
        serviceInterface.setName(javaInterface.getSimpleName());
        Deprecated interfaceDeprecated = javaInterface.getAnnotation(Deprecated.class);
        if (interfaceDeprecated != null) {
            serviceInterface.setDeprecated(true);
        }
        for (Method method : javaInterface.getMethods()) {
            if (!method.isDefault()) {
                String handlerName = method.getName();
                ReactiveOperation operation = new ReactiveOperation();
                Deprecated methodDeprecated = method.getAnnotation(Deprecated.class);
                if (methodDeprecated != null) {
                    operation.setDeprecated(true);
                }
                serviceInterface.addOperation(operation);
                operation.setName(handlerName);
                operation.setReturnType(method.getReturnType().getCanonicalName());
                operation.setReturnInferredType(ReactiveMethodSupport.parseInferredClass(method.getGenericReturnType()).getCanonicalName());
                for (Parameter parameter : method.getParameters()) {
                    OperationParameter param = new OperationParameter();
                    operation.addParameter(param);
                    param.setName(parameter.getName());
                    param.setType(parameter.getType().getCanonicalName());
                    String inferredType = ReactiveMethodSupport.parseInferredClass(parameter.getParameterizedType()).getCanonicalName();
                    if (!param.getType().equals(inferredType)) {
                        param.setInferredType(inferredType);
                    }
                }
            }
        }
        return serviceInterface;
    }

    public  LocalReactiveServiceCallerImpl();

}