Class ServiceRoutePaths

java.lang.Object
org.ek9lang.compiler.support.ServiceRoutePaths
All Implemented Interfaces:
Function<String,String>, UnaryOperator<String>

public final class ServiceRoutePaths extends Object implements UnaryOperator<String>
THE normalisation of a service route's URI-template parameters for route-identity comparison — use this, do not re-derive the \{.*?} regex. Collapsing every {name} placeholder to a bare {} makes two routes that differ only in their path-parameter names compare equal.

Single source shared by phase-2 duplicate-path detection (NoDuplicatedServicePathsOrError) and the MCP ServiceRoutesExtractor route-identity index, so the compiler's uniqueness guarantee and the tool's route→symbol lookup can never drift on what "the same route" means.

  • Constructor Details

    • ServiceRoutePaths

      public ServiceRoutePaths()
  • Method Details

    • apply

      public String apply(String uriTemplate)
      Replace every {parameterName} placeholder in a URI template with a bare {}.
      Specified by:
      apply in interface Function<String,String>