O - type of data to decorate@Deprecated public class JXPathDecorator<O> extends Decorator<O>
String.format(String, Object...) method.
To use it, give to him a expression where all jxpath to apply on bean are
boxed in ${}.
After the jxpath token you must specifiy the formatter to apply of the
jxpath token.
For example :
Decorator<Object> d = DecoratorUtil.newJXPathDecorator(
JXPathDecorator.class,"expr = ${expressions}$s");
assert "expr = %1$s" == d.getExpression();
assert 1 == d.getNbToken();
assert java.util.Arrays.asList("expression") == d.getTokens();
assert "expr = %1$s" == d.toString(d);
Decorator,
Serialized Form| Modifier and Type | Class and Description |
|---|---|
static class |
JXPathDecorator.Context<O>
Deprecated.
|
static class |
JXPathDecorator.JXPathComparator<O>
Deprecated.
|
| Modifier and Type | Field and Description |
|---|---|
protected JXPathDecorator.Context<O> |
context
Deprecated.
the computed context of the decorator
|
protected String |
initialExpression
Deprecated.
the initial expression used to compute the decorator context.
|
protected int |
nbToken
Deprecated.
nb jxpath tokens to compute
|
| Modifier | Constructor and Description |
|---|---|
protected |
JXPathDecorator(Class<O> internalClass,
String expression,
JXPathDecorator.Context<O> context)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
protected static void |
ensureTokenIndex(JXPathDecorator<?> decorator,
int pos)
Deprecated.
|
protected Comparator<O> |
getComparator(int pos)
Deprecated.
|
String |
getExpression()
Deprecated.
|
String |
getInitialExpression()
Deprecated.
|
int |
getNbToken()
Deprecated.
|
String |
getProperty(int pos)
Deprecated.
|
String[] |
getTokens()
Deprecated.
|
protected Comparable<Comparable<?>> |
getTokenValue(org.apache.commons.jxpath.JXPathContext jxcontext,
String token)
Deprecated.
|
void |
setContext(JXPathDecorator.Context<O> context)
Deprecated.
|
String |
toString()
Deprecated.
|
String |
toString(Object bean)
Deprecated.
|
getInternalClass, getTypeprotected JXPathDecorator.Context<O> context
protected int nbToken
protected String initialExpression
protected JXPathDecorator(Class<O> internalClass, String expression, JXPathDecorator.Context<O> context) throws IllegalArgumentException, NullPointerException
public String getProperty(int pos)
public String getExpression()
public String[] getTokens()
public int getNbToken()
public String getInitialExpression()
public void setContext(JXPathDecorator.Context<O> context)
protected Comparator<O> getComparator(int pos)
protected Comparable<Comparable<?>> getTokenValue(org.apache.commons.jxpath.JXPathContext jxcontext, String token)
protected static void ensureTokenIndex(JXPathDecorator<?> decorator, int pos)
Copyright © 2004-2013 CodeLutin. All Rights Reserved.