code: static String findPath(Method method) {
          Path pathFromClass = method.getDeclaringClass().getAnnotation(Path.class);
          Path pathFromMethod = method.getAnnotation(Path.class);
  
          String path = concatenatePathValues(pathFromClass, pathFromMethod);
          if (path == null) {
              return null;
          } else {
              path = addLeadingSlash(path);
              return UriBuilder.stripJaxRsRegex(path);
          }
      }
docs: Finds the path of a method. If the declaring class and the method are both
  annotated with {@literal @}Path, the paths will be concatenated.
  <p>
  Leading or ending slashes in paths are not taken in account. The method
  will always add a leading slash and strip the ending slash.
  </p>
  <p>
  If JAX-RS regex are present in the path, they will be replaced by
  UriTemplate expressions.
  </p>
  For example:
  <pre>
  {@literal @}Path("widgets/{widgetName: [a-zA-Z][a-zA-Z_0-9]}/") --> /widgets/{widgetName}
  </pre>
  
  @param method the method to scan
  @return the resource's path