com.vaadin.flow.router.
Class RouteParameterRegex
- java.lang.Object
-
- com.vaadin.flow.router.RouteParameterRegex
-
All Implemented Interfaces:
public class RouteParameterRegex extends Object implements Serializable
Predefined regex used with template parameters.
See Also:
-
-
Field Summary
Fields Modifier and Type Field and Description static String
BOOLEAN
Boolean type regex.
static String
INTEGER
Integer type regex.
static String
LONG
Long type regex.
-
Method Summary
All Methods Modifier and Type Method and Description static String
getName(String regex)
Gets the name representation of the regex.
static String
getRegex(Class<?> parameterType)
Gets the regex used for the given parameterType.
static Class<?>
getType(String regex)
Gets the type of the parameter for the given regex.
-
-
-
Field Detail
-
INTEGER
public static final String INTEGER
Integer type regex.
See Also:
-
LONG
public static final String LONG
Long type regex.
See Also:
-
BOOLEAN
public static final String BOOLEAN
Boolean type regex.
See Also:
-
-
Method Detail
-
getRegex
public static String getRegex(Class<?> parameterType)
Gets the regex used for the given parameterType.
Parameters:
parameterType
- type of the parameter.Returns:
the regex matching the type.
-
getType
public static Class<?> getType(String regex)
Gets the type of the parameter for the given regex.
Parameters:
regex
- the regex.Returns:
the type of the parameter.
-
-