|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectcom.bastengao.struts2.freeroute.RouteUtil
public class RouteUtil
路由工具类
| 字段摘要 | |
|---|---|
static Pattern |
PATH_VARIABLE_PATTERN
|
| 构造方法摘要 | |
|---|---|
private |
RouteUtil()
|
| 方法摘要 | |
|---|---|
static String |
flatRoutePath(String routePath)
如果 routePath 中有 pathVariable, 例如 "/persons/{id}" 那么将路由转化为 "/persons/__id__" "/persons/{id}/edit" 转化为 "/persons/__id__/edit" |
static boolean |
hasPathVariables(String routePath)
是否有 pathVariable |
static List<String> |
pathVariableNames(String routePath)
返回路由中的变量名 |
static String |
toRoutePathPattern(String routePath)
将路由路径转化为能够匹配此路径请求的正则表达式 |
static MethodType |
valueOfMethod(String method)
根据 http method 返回对应的枚举 如果没有匹配的返回 MethodType.NONE |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 字段详细信息 |
|---|
public static final Pattern PATH_VARIABLE_PATTERN
| 构造方法详细信息 |
|---|
private RouteUtil()
| 方法详细信息 |
|---|
public static boolean hasPathVariables(String routePath)
routePath -
public static String toRoutePathPattern(String routePath)
routePath -
public static List<String> pathVariableNames(String routePath)
routePath -
public static String flatRoutePath(String routePath)
routePath -
public static MethodType valueOfMethod(String method)
method -
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||