Package com.linecorp.armeria.server
Enum RoutePathType
- All Implemented Interfaces:
Serializable
,Comparable<RoutePathType>
,java.lang.constant.Constable
public enum RoutePathType extends Enum<RoutePathType>
The type of the path which was specified when a
Route
is created.- See Also:
RouteBuilder.path(String)
-
Nested Class Summary
-
Enum Constant Summary
Enum Constants Enum Constant Description EXACT
The exact path type. e.g, "/foo"PARAMETERIZED
The path which contains path parameters. e.g, "/:", "/foo/:/bar/:"PREFIX
The prefix path type. e.g, "/", "/foo/"REGEX
The regex path type. e.g,"^/(?<foo>.*)$"
TheRoute
which is created usingRouteBuilder.glob(String)
andRouteBuilder.regex(String)
can be this type.REGEX_WITH_PREFIX
The path which has the prefix and the regex. -
Method Summary
Modifier and Type Method Description boolean
hasTriePath()
Tells whether thisRoutePathType
has a trie path or not.static RoutePathType
valueOf(String name)
Returns the enum constant of this type with the specified name.static RoutePathType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
EXACT
The exact path type. e.g, "/foo" -
PREFIX
The prefix path type. e.g, "/", "/foo/" -
PARAMETERIZED
The path which contains path parameters. e.g, "/:", "/foo/:/bar/:" -
REGEX
The regex path type. e.g,"^/(?<foo>.*)$"
TheRoute
which is created usingRouteBuilder.glob(String)
andRouteBuilder.regex(String)
can be this type. -
REGEX_WITH_PREFIX
The path which has the prefix and the regex.- See Also:
RouteBuilder.path(String, String)
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
hasTriePath
public boolean hasTriePath()Tells whether thisRoutePathType
has a trie path or not.
-