|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.abdera.i18n.templates.Template
public final class Template
Used to evaluate a URI Template. Instances are immutable, cloneable, serializable and threadsafe.
Constructor Summary | |
---|---|
Template(String pattern)
|
Method Summary | |
---|---|
Template |
clone()
Clone this Template instance |
boolean |
equals(Object obj)
|
String |
expand(Context context)
Expand the URI Template using the specified Context. |
String |
expand(Object object)
Expand the URI Template using the non-private fields and methods of the specified object to resolve the template tokens |
String |
expand(Object object,
boolean isiri)
Expand the template using the non-private fields and methods of the specified object to resolve the template tokens. |
static String |
expand(String pattern,
Context context)
|
static String |
expand(String pattern,
Object object)
|
static String |
expand(String pattern,
Object object,
boolean isiri)
|
static String |
expandAnnotated(Object object)
Use an Object annotated with the URITemplate annotation to expand a template |
String |
explain()
|
void |
explain(Appendable buf)
|
static String |
explain(String pattern)
|
static void |
explain(String pattern,
Appendable buf)
|
String |
getPattern()
Return the URI Template pattern |
String |
getPatternForDisplay()
IRI Templates that contain bidirectional characters will typically not display properly in unicode enabled environments. |
String[] |
getVariables()
Return the array of template variables |
int |
hashCode()
|
Iterator<String> |
iterator()
Iterate the template tokens |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Template(String pattern)
pattern
- A URI TemplateMethod Detail |
---|
public String getPattern()
public String getPatternForDisplay()
public Iterator<String> iterator()
iterator
in interface Iterable<String>
public String[] getVariables()
public String expand(Context context)
context
- The Context impl used to resolve variable values
public String expand(Object object)
public String expand(Object object, boolean isiri)
public Template clone()
clone
in class Object
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public String toString()
toString
in class Object
public String explain()
public void explain(Appendable buf) throws IOException
IOException
public static String expand(String pattern, Context context)
public static String expand(String pattern, Object object)
public static String expand(String pattern, Object object, boolean isiri)
public static String expandAnnotated(Object object)
public static String explain(String pattern)
public static void explain(String pattern, Appendable buf) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |