public final class DefaultXPathEvaluator extends Object implements XPathEvaluator
| Constructor and Description |
|---|
DefaultXPathEvaluator(XBProjector projector,
DocumentResolver documentProvider,
String xpath)
Constructor for DefaultXPathEvaluator.
|
| Modifier and Type | Method and Description |
|---|---|
<T> T |
as(Class<T> returnType)
Evaluate the XPath as a value of the given type.
|
<T> T[] |
asArrayOf(Class<T> componentType)
Evaluate the XPath as an array of the given type.
|
boolean |
asBoolean()
Evaluates the XPath as a boolean value.
|
Date |
asDate()
Evaluates the XPath as a Date value.
|
int |
asInt()
Evaluates the XPath as a int value.
|
<T> List<T> |
asListOf(Class<T> componentType)
Evaluate the XPath as a list of the given type.
|
String |
asString()
Evaluates the XPath as a String value.
|
static List<?> |
evaluateAsList(XPathExpression expression,
Node node,
Method method,
InvocationContext invocationContext)
Perform an XPath evaluation on an invocation context.
|
public DefaultXPathEvaluator(XBProjector projector, DocumentResolver documentProvider, String xpath)
projector - documentProvider - xpath - public boolean asBoolean()
asBoolean in interface XPathEvaluatorpublic int asInt()
asInt in interface XPathEvaluatorpublic String asString()
asString in interface XPathEvaluatorpublic Date asDate()
asDate in interface XPathEvaluatorpublic <T> T as(Class<T> returnType)
as in interface XPathEvaluatorreturnType - Possible values: primitive types (e.g. Short.Type), Projection interfaces, any
class with a String constructor or a String factory method, and org.w3c.Nodepublic <T> T[] asArrayOf(Class<T> componentType)
asArrayOf in interface XPathEvaluatorcomponentType - Possible values: primitive types (e.g. Short.Type), Projection interfaces, any
class with a String constructor or a String factory method, and org.w3c.Nodepublic <T> List<T> asListOf(Class<T> componentType)
asListOf in interface XPathEvaluatorcomponentType - Possible values: primitive types (e.g. Short.Type), Projection interfaces, any
class with a String constructor or a String factory method, and org.w3c.Nodepublic static List<?> evaluateAsList(XPathExpression expression, Node node, Method method, InvocationContext invocationContext) throws XPathExpressionException
expression - node - method - invocationContext - XPathExpressionExceptionCopyright © 2012-12-21-2017. All Rights Reserved.