JDK 11 java.xml.jmod - XML Module

JDK 11 java.xml.jmod is the JMOD file for JDK 11 XML (eXtensible Markup Language) module.

JDK 11 XML module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\java.xml.jmod.

JDK 11 XML module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.

JDK 11 XML module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\java.xml.

You can click and view the content of each source code file in the list below.

✍: FYIcenter

⏎ javax/xml/xpath/XPathEvaluationResult.java

/*
 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
 * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 */
package javax.xml.xpath;

import java.util.Objects;
import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
 * The {@code XPathEvaluationResult} interface represents the result of the
 * evaluation of an XPath expression within the context of a particular node.
 * The evaluation of an XPath expression can result in various result types as
 * defined in XML Path Language (XPath) Version 1.0.
 *
 * @param <T> the object type returned by the XPath evaluation.
 * @see <a href="http://www.w3.org/TR/xpath">XML Path Language (XPath) Version
 * 1.0</a>
 *
 * @since 9
 */
public interface XPathEvaluationResult<T> {

    /**
     * XPathResultType represents possible return types of an XPath evaluation.
     * Provided as an enum type, it allows the use of switch statement. At the
     * same time, a mapping is provided between the original QName types in
     * {@link XPathConstants} and class types used in the generic methods.
     */
    public static enum XPathResultType {
        /**
         * Any type that represents any of the 5 other types listed below.
         * Maps to {@link XPathEvaluationResult}.
         */
        ANY(new QName("http://www.w3.org/1999/XSL/Transform", "any"), XPathEvaluationResult.class),
        /**
         * The XPath 1.0 boolean data type. Maps to Java {@link Boolean}.
         */
        BOOLEAN(XPathConstants.BOOLEAN, Boolean.class),
        /**
         * The XPath 1.0 Number data type. Maps to Java {@link Number}. Of the
         * subtypes of Number, only Double, Integer and Long are required.
         */
        NUMBER(XPathConstants.NUMBER, Number.class),
        /**
         * The XPath 1.0 String data type. Maps to Java {@link String}.
         */
        STRING(XPathConstants.STRING, String.class),
        /**
         * The XPath 1.0 NodeSet data type. Maps to {@link org.w3c.dom.NodeList}.
         */
        NODESET(XPathConstants.NODESET, XPathNodes.class),
        /**
         * The XPath 1.0 NodeSet data type. Maps to {@link org.w3c.dom.Node}.
         */
        NODE(XPathConstants.NODE, Node.class);

        final QName qnameType;
        final Class<?> clsType;
        XPathResultType(QName qnameType, Class<?> clsType) {
            this.qnameType = qnameType;
            this.clsType = clsType;
        }

        /**
         * Compares this type to the specified class type.
         * @param clsType class type
         * @return true if the argument is not null and is a class type that
         * matches that this type represents, false otherwise.
         */
        private boolean equalsClassType(Class<?> clsType) {
            Objects.nonNull(clsType);
            if (clsType.isAssignableFrom(this.clsType)) {
                return true;
            }
            return false;
        }

        /**
         * Returns the QName type as specified in {@link XPathConstants} that
         * corresponds to the specified class type.
         * @param clsType a class type that the enum type supports
         * @return the QName type that matches with the specified class type,
         * null if there is no match
         */
        static public QName getQNameType(Class<?> clsType) {
            for (XPathResultType type : XPathResultType.values()) {
                if (type.equalsClassType(clsType)) {
                    return type.qnameType;
                }
            }
            return null;
        }
    }

    /**
     * Return the result type as an enum specified by {@code XPathResultType}
     * @return the result type
     */
    public XPathResultType type();

    /**
     * Returns the value of the result as the type {@code <T>} specified for the class.
     *
     * @return The value of the result.
     */
    public T value();

}

⏎ javax/xml/xpath/XPathEvaluationResult.java

 

Or download all of them as a single archive file:

File name: java.xml-11.0.1-src.zip
File size: 4876106 bytes
Release date: 2018-11-04
Download 

 

⇒ JDK 11 java.xml.crypto.jmod - XML Crypto Module

⇐ JDK 11 java.transaction.xa.jmod - Transaction XA Module

⇑ Download and Use JDK 11

⇑⇑ FAQ for JDK (Java Development Kit)

2020-08-25, ≈690🔥, 0💬