< prev index next >
jaxp/src/java.xml/share/classes/javax/xml/xpath/XPathExpression.java
Print this page
*** 244,254 ****
* XPathResultType}, or XPathEvaluationResult is specified as the type but an
* implementation supporting the
* {@link XPathEvaluationResult.XPathResultType#ANY ANY} type is not available.
* @throws NullPointerException If {@code type} is {@code null}.
*
! * @since 1.9
*/
default <T>T evaluateExpression(Object item, Class<T> type)
throws XPathExpressionException
{
return type.cast(evaluate(item, XPathEvaluationResult.XPathResultType.getQNameType(type)));
--- 244,254 ----
* XPathResultType}, or XPathEvaluationResult is specified as the type but an
* implementation supporting the
* {@link XPathEvaluationResult.XPathResultType#ANY ANY} type is not available.
* @throws NullPointerException If {@code type} is {@code null}.
*
! * @since 9
*/
default <T>T evaluateExpression(Object item, Class<T> type)
throws XPathExpressionException
{
return type.cast(evaluate(item, XPathEvaluationResult.XPathResultType.getQNameType(type)));
*** 290,300 ****
* @throws XPathExpressionException If the expression cannot be evaluated.
* @throws IllegalArgumentException If the implementation of this method
* does not support the
* {@link XPathEvaluationResult.XPathResultType#ANY ANY} type.
*
! * @since 1.9
*/
default XPathEvaluationResult<?> evaluateExpression(Object item)
throws XPathExpressionException
{
return evaluateExpression(item, XPathEvaluationResult.class);
--- 290,300 ----
* @throws XPathExpressionException If the expression cannot be evaluated.
* @throws IllegalArgumentException If the implementation of this method
* does not support the
* {@link XPathEvaluationResult.XPathResultType#ANY ANY} type.
*
! * @since 9
*/
default XPathEvaluationResult<?> evaluateExpression(Object item)
throws XPathExpressionException
{
return evaluateExpression(item, XPathEvaluationResult.class);
*** 336,346 ****
* implementation supporting the
* {@link XPathEvaluationResult.XPathResultType#ANY ANY} type
* is not available.
* @throws NullPointerException If {@code source or type} is {@code null}.
*
! * @since 1.9
*/
default <T>T evaluateExpression(InputSource source, Class<T> type)
throws XPathExpressionException
{
return type.cast(evaluate(source, XPathEvaluationResult.XPathResultType.getQNameType(type)));
--- 336,346 ----
* implementation supporting the
* {@link XPathEvaluationResult.XPathResultType#ANY ANY} type
* is not available.
* @throws NullPointerException If {@code source or type} is {@code null}.
*
! * @since 9
*/
default <T>T evaluateExpression(InputSource source, Class<T> type)
throws XPathExpressionException
{
return type.cast(evaluate(source, XPathEvaluationResult.XPathResultType.getQNameType(type)));
*** 375,385 ****
* @throws IllegalArgumentException If the implementation of this method
* does not support the
* {@link XPathEvaluationResult.XPathResultType#ANY ANY} type.
* @throws NullPointerException If {@code source} is {@code null}.
*
! * @since 1.9
*/
default XPathEvaluationResult<?> evaluateExpression(InputSource source)
throws XPathExpressionException
{
return evaluateExpression(source, XPathEvaluationResult.class);
--- 375,385 ----
* @throws IllegalArgumentException If the implementation of this method
* does not support the
* {@link XPathEvaluationResult.XPathResultType#ANY ANY} type.
* @throws NullPointerException If {@code source} is {@code null}.
*
! * @since 9
*/
default XPathEvaluationResult<?> evaluateExpression(InputSource source)
throws XPathExpressionException
{
return evaluateExpression(source, XPathEvaluationResult.class);
< prev index next >