Package ratpack.core.path
Interface PathBinderBuilder
-
public interface PathBinderBuilderA builder to generate aPathBinderfrom a list of tokens and literals.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PathBinderbuild(boolean exhaustive)Generate aPathBinderfrom the contents of the builder.PathBinderBuilderliteral(String literal)Add a literal to the path.PathBinderBuilderliteralPattern(String pattern)Add a regular expression parameterized literal element to the path.PathBinderBuilderoptionalToken(String token)Add an optional token to the path.PathBinderBuilderoptionalTokenWithPattern(String token, String pattern)Add a regular expression parameterized named optional token to the path.PathBinderBuildertoken(String token)Add a token to the path.PathBinderBuildertokenWithPattern(String token, String pattern)Add a regular expression parameterized named token to the path.
-
-
-
Method Detail
-
tokenWithPattern
PathBinderBuilder tokenWithPattern(String token, String pattern)
Add a regular expression parameterized named token to the path.- Parameters:
token- the name of the tokenpattern- the valid regex pattern- Returns:
- this
-
optionalTokenWithPattern
PathBinderBuilder optionalTokenWithPattern(String token, String pattern)
Add a regular expression parameterized named optional token to the path.- Parameters:
token- the name of the optional tokenpattern- the valid regex pattern- Returns:
- this
-
token
PathBinderBuilder token(String token)
Add a token to the path.- Parameters:
token- the name of the token- Returns:
- this
-
optionalToken
PathBinderBuilder optionalToken(String token)
Add an optional token to the path.- Parameters:
token- the name of the optional token- Returns:
- this
-
literalPattern
PathBinderBuilder literalPattern(String pattern)
Add a regular expression parameterized literal element to the path.- Parameters:
pattern- the valid regex pattern- Returns:
- this
-
literal
PathBinderBuilder literal(String literal)
Add a literal to the path.- Parameters:
literal- the literal path component- Returns:
- this
-
build
PathBinder build(boolean exhaustive)
Generate aPathBinderfrom the contents of the builder.- Parameters:
exhaustive- whether this path should be an exact match- Returns:
- a new
PathBinderbased on the state of this builder
-
-