Class PathMatcher

java.lang.Object
com.arc_e_tect.gradle.shadow.model.PathMatcher

public final class PathMatcher extends Object
Compares two normalised path templates for structural equivalence, tolerant of path-variable naming differences (e.g. Spring's "{id}" against an OpenAPI "{userId}").
  • Method Details

    • matches

      public static boolean matches(String pathA, String pathB)
      Returns whether two normalised path templates are structurally equivalent: same number of "/"-delimited segments, with every literal segment equal and every placeholder segment (e.g. "{id}") aligned with a placeholder segment on the other side, regardless of the placeholder's variable name.
      Parameters:
      pathA - a path template normalised via PathTemplates.normalize(String)
      pathB - a path template normalised via PathTemplates.normalize(String)
      Returns:
      true when the two templates describe the same set of concrete paths