code: private static String findPattern(Method method, Set<Annotation> methodAnnotations) {
          String pattern = findFirst(method, Path.class).map(Path::value)
                                                        .orElse(null);
          for (Annotation a : methodAnnotations) {
              final String p = (String) invokeValueMethod(a);
              if (DefaultValues.isUnspecified(p)) {
                  continue;
              }
              checkArgument(pattern == null,
                            "Only one path can be specified. (" + pattern + ", " + p + ')');
              pattern = p;
          }
          if (pattern == null || pattern.isEmpty()) {
              throw new IllegalArgumentException(
                      "A path pattern should be specified by @Path or HTTP method annotations.");
          }
          return pattern;
      }
docs: Returns a specified path pattern. The path pattern might be specified by {@link Path} or
  HTTP method annotations such as {@link Get} and {@link Post}.