Class DelegatingRouteMatcher<R>

  • Type Parameters:
    R - The type or request being matched.

    public class DelegatingRouteMatcher<R>
    extends RouteMatcher<R>
    A route matcher that delegates to a provided route matcher.
    • Constructor Detail

      • DelegatingRouteMatcher

        public DelegatingRouteMatcher​(RouteMatcher<R> delegate)
        Create a new route matcher, delegating to the provided delegate.
        Parameters:
        delegate - The delegate.
    • Method Detail

      • evaluate

        public RouteMatch evaluate​(Context context,
                                   R request)
        Description copied from class: RouteMatcher
        Evaluates the request and determines whether it matches the route.
        Specified by:
        evaluate in class RouteMatcher<R>
        Parameters:
        context - The request context.
        request - The request.
        Returns:
        A RouteMatch, if the request matches the route, or null, if not.
      • toString

        public String toString()
        Description copied from class: RouteMatcher
        Returns a String representation of the route matcher.
        Specified by:
        toString in class RouteMatcher<R>
        Returns:
        A string representation of the route matcher.
      • idFragment

        public String idFragment()
        Description copied from class: RouteMatcher
        The fragment of an API ID that this matcher provides.
        Specified by:
        idFragment in class RouteMatcher<R>
        Returns:
        A fragment of the API ID.
      • transformApi

        public <D> D transformApi​(D descriptor,
                                  ApiProducer<D> producer)
        Description copied from class: RouteMatcher
        Transform the API Descriptor as appropriate for the parent router's view of the child routes.
        Specified by:
        transformApi in class RouteMatcher<R>
        Type Parameters:
        D - The type of descriptor object.
        Parameters:
        descriptor - The descriptor to be mutated.
        producer - The API Descriptor producer.
        Returns:
        The new descriptor object.