if (mapping.supportedMethods().stream().noneMatch( method -> existingMapping.supportedMethods().contains(method))) {
private static void addMethodInfo(Map<Class<?>, Set<MethodInfo>> methodInfos, String hostnamePattern, AnnotatedHttpService service) { final PathMapping pathMapping = service.pathMapping(); final EndpointInfo endpoint = endpointInfo(pathMapping, hostnamePattern); if (endpoint == null) { return; } final Method method = service.method(); final String name = method.getName(); final TypeSignature returnTypeSignature = toTypeSignature(method.getGenericReturnType()); final List<FieldInfo> fieldInfos = fieldInfos(service.annotatedValueResolvers()); final Class<?> clazz = service.object().getClass(); pathMapping.supportedMethods().forEach( httpMethod -> { final MethodInfo methodInfo = new MethodInfo( name, returnTypeSignature, fieldInfos, ImmutableList.of(), // Ignore exceptions. ImmutableList.of(endpoint), httpMethod, findDescription(method)); methodInfos.computeIfAbsent(clazz, unused -> new HashSet<>()).add(methodInfo); }); }