Interface PathBinder

    • Method Detail

      • bind

        Optional<PathBinding> bind​(PathBinding parentBinding)
        Attempts to bind in the context of the given parent binding.

        A binder may use whatever strategy it desires to decider whether or not it wants to create a binding for the given path.

        Parameters:
        parentBinding - the parent binding
        Returns:
        A binding if one could be created
      • parse

        static PathBinder parse​(String pathBindingSpec,
                                boolean exhaustive)
        Creates a path binder by parsing the given path binding specification.

        This method is used by methods such as Chain.path(String, Class).

        See the section on path binding as part of the Chain documentation for the format of the string.

        Parameters:
        pathBindingSpec - the path binding specification.
        exhaustive - whether the binder must match the entire unbound path (false for a prefix match)
        Returns:
        a path binder constructed from the given path binding specification
      • of

        static PathBinder of​(boolean exhaustive,
                             Action<? super PathBinderBuilder> action)
                      throws Exception
        Builds a path binder programmatically.
        Parameters:
        exhaustive - whether the binder must match the entire unbound path (false for a prefix match)
        action - the binder definition
        Returns:
        a path binder
        Throws:
        Exception - any thrown by action
      • builder

        static PathBinderBuilder builder()
        Creates a new path binder builder.
        Returns:
        a new path binder builder