org.springframework.extensions.webscripts
Class UriTemplate
java.lang.Object
org.springframework.extensions.webscripts.UriTemplate
public class UriTemplate
- extends Object
Class representing a Uri Template - with basic {token} format support.
See JAX-RS JSR-311.
- Author:
- davidc
UriTemplate
public UriTemplate(String template)
- Construct
- Parameters:
template
-
match
public Map<String,String> match(String uri)
- Determine if uri is matched by this uri template and return a map of variable
values if it does.
- Parameters:
uri
- uri to match
- Returns:
- map of variable values (or null, if no match, or empty if no vars)
getTemplate
public String getTemplate()
- Returns:
- get template
getRegex
public Pattern getRegex()
- Returns:
- get regular expression equivalent
getVariableNames
public String[] getVariableNames()
- Returns:
- get variable names contained in uri template
getStaticCharCount
public int getStaticCharCount()
- Returns:
- get number of static characters in uri template
toString
public final String toString()
- Overrides:
toString
in class Object
hashCode
public final int hashCode()
- Overrides:
hashCode
in class Object
equals
public final boolean equals(Object obj)
- Overrides:
equals
in class Object
Copyright © 2009 SpringSource, Inc. All Rights Reserved.