private static void putGrpcExceptionHandlerIfPresent(
                Class<?> clazz, Method method, DependencyInjector dependencyInjector,
                ServerMethodDefinition<?, ?> methodDefinition,
                final ImmutableMap.Builder<ServerMethodDefinition<?, ?>, GrpcExceptionHandlerFunction>
                        grpcExceptionHandlersBuilder,
                GrpcExceptionHandlerFunction defaultExceptionHandler) {
            final List<GrpcExceptionHandlerFunction> exceptionHandlers =
                    AnnotationUtil.getAnnotatedInstances(method, clazz,
                                                         GrpcExceptionHandler.class,
                                                         GrpcExceptionHandlerFunction.class,
                                                         dependencyInjector).build();
            final Optional<GrpcExceptionHandlerFunction> grpcExceptionHandler =
                    exceptionHandlers.stream().reduce(GrpcExceptionHandlerFunction::orElse);

            grpcExceptionHandler.ifPresent(exceptionHandler -> {
                exceptionHandler = exceptionHandler.orElse(defaultExceptionHandler);
                grpcExceptionHandlersBuilder.put(methodDefinition, exceptionHandler);
            });
        }
A registry of the implementation methods bound to a {@link GrpcService}. Used for method dispatch and
documentation generation.
grpc/src/main/java/com/linecorp/armeria/server/grpc/HandlerRegistry.java