< prev index next >

jaxp/src/java.xml/share/classes/javax/xml/xpath/XPath.java

Print this page

        

*** 349,359 **** * corresponding to the types defined in the {@link XPathEvaluationResult.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 expression or type} is {@code null}. * ! * @since 1.9 */ default <T>T evaluateExpression(String expression, Object item, Class<T> type) throws XPathExpressionException { return type.cast(evaluate(expression, item, XPathEvaluationResult.XPathResultType.getQNameType(type))); --- 349,359 ---- * corresponding to the types defined in the {@link XPathEvaluationResult.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 expression or type} is {@code null}. * ! * @since 9 */ default <T>T evaluateExpression(String expression, Object item, Class<T> type) throws XPathExpressionException { return type.cast(evaluate(expression, item, XPathEvaluationResult.XPathResultType.getQNameType(type)));
*** 397,407 **** * @throws IllegalArgumentException If the implementation of this method * does not support the * {@link XPathEvaluationResult.XPathResultType#ANY ANY} type. * @throws NullPointerException If {@code expression} is {@code null}. * ! * @since 1.9 */ default XPathEvaluationResult<?> evaluateExpression(String expression, Object item) throws XPathExpressionException { return evaluateExpression(expression, item, XPathEvaluationResult.class); --- 397,407 ---- * @throws IllegalArgumentException If the implementation of this method * does not support the * {@link XPathEvaluationResult.XPathResultType#ANY ANY} type. * @throws NullPointerException If {@code expression} is {@code null}. * ! * @since 9 */ default XPathEvaluationResult<?> evaluateExpression(String expression, Object item) throws XPathExpressionException { return evaluateExpression(expression, item, XPathEvaluationResult.class);
*** 443,453 **** * 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 expression, source or type}is {@code null}. * ! * @since 1.9 */ default <T>T evaluateExpression(String expression, InputSource source, Class<T> type) throws XPathExpressionException { return type.cast(evaluate(expression, source, --- 443,453 ---- * 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 expression, source or type}is {@code null}. * ! * @since 9 */ default <T>T evaluateExpression(String expression, InputSource source, Class<T> type) throws XPathExpressionException { return type.cast(evaluate(expression, source,
*** 484,494 **** * @throws IllegalArgumentException If the implementation of this method * does not support the * {@link XPathEvaluationResult.XPathResultType#ANY ANY} type. * @throws NullPointerException If {@code expression or source} is {@code null}. * ! * @since 1.9 */ default XPathEvaluationResult<?> evaluateExpression(String expression, InputSource source) throws XPathExpressionException { return evaluateExpression(expression, source, XPathEvaluationResult.class); --- 484,494 ---- * @throws IllegalArgumentException If the implementation of this method * does not support the * {@link XPathEvaluationResult.XPathResultType#ANY ANY} type. * @throws NullPointerException If {@code expression or source} is {@code null}. * ! * @since 9 */ default XPathEvaluationResult<?> evaluateExpression(String expression, InputSource source) throws XPathExpressionException { return evaluateExpression(expression, source, XPathEvaluationResult.class);
< prev index next >