|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjaxx.runtime.decorator.DecoratorUtils
public class DecoratorUtils
Some usefull methods on Decorator to create, and sort data with decorators.
newPropertyDecorator(Class, String)newJXPathDecorator(Class, String)newMultiJXPathDecorator(Class, String, String))newMultiJXPathDecorator(Class, String, String, String))JXPathDecorator, use the method
sort(JXPathDecorator, List, int).
jaxx.runtime.DecoratorUtils)| Constructor Summary | |
|---|---|
DecoratorUtils()
|
|
| Method Summary | ||
|---|---|---|
static
|
createJXPathContext(String expression)
|
|
static
|
createMultiJXPathContext(String expression,
String separator,
String separatorReplacement)
|
|
protected static
|
newInstance(int size)
|
|
static
|
newJXPathDecorator(Class<O> internalClass,
String expression)
Factory method to instanciate a new JXPathDecorator for the
given class internalClass and expression. |
|
static
|
newMultiJXPathDecorator(Class<O> internalClass,
String expression,
String separator)
|
|
static
|
newMultiJXPathDecorator(Class<O> internalClass,
String expression,
String separator,
String separatorReplacement)
|
|
static
|
newPropertyDecorator(Class<O> internalClass,
String property)
Factory method to instanciate a new PropertyDecorator for the
given class internlaClass and a readable property name. |
|
static
|
sort(JXPathDecorator<O> decorator,
List<O> datas,
int pos)
Sort a list of data based on the first token property of a given context in a given decorator. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DecoratorUtils()
| Method Detail |
|---|
public static <O> PropertyDecorator<O> newPropertyDecorator(Class<O> internalClass,
String property)
throws IllegalArgumentException,
NullPointerException
PropertyDecorator for the
given class internlaClass and a readable property name.
O - the generic type of class to be decorated by the new decoratorinternalClass - the class of the objects decorated by the new decoratorproperty - the property
IllegalArgumentException - if the expression is not valid, says:
- a missing right brace was detected.
- a ${ was found in a jxpath token.
NullPointerException - if internalClass parameter is null.
public static <O> JXPathDecorator<O> newJXPathDecorator(Class<O> internalClass,
String expression)
throws IllegalArgumentException,
NullPointerException
JXPathDecorator for the
given class internalClass and expression.
O - the generic type of class to be decorated by the
new decoratorinternalClass - the class of the objects decorated by the new
decoratorexpression - the expression to use to decorated objects
IllegalArgumentException - if the expression is not valid, says:
- a missing right brace was detected.
- a ${ was found in a jxpath token.
NullPointerException - if internalClass parameter is null.
public static <O> MultiJXPathDecorator<O> newMultiJXPathDecorator(Class<O> internalClass,
String expression,
String separator)
throws IllegalArgumentException,
NullPointerException
IllegalArgumentException
NullPointerException
public static <O> MultiJXPathDecorator<O> newMultiJXPathDecorator(Class<O> internalClass,
String expression,
String separator,
String separatorReplacement)
throws IllegalArgumentException,
NullPointerException
IllegalArgumentException
NullPointerException
public static <O> void sort(JXPathDecorator<O> decorator,
List<O> datas,
int pos)
O - type of data to sortdecorator - the decorator to use to sortdatas - the list of data to sortpos - the index of context to used in decorator to obtain
sorted property.public static <O> JXPathDecorator.Context<O> createJXPathContext(String expression)
public static <O> JXPathDecorator.Context<O>[] createMultiJXPathContext(String expression,
String separator,
String separatorReplacement)
protected static <O> JXPathDecorator.Context<O>[] newInstance(int size)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||