类org.w3c.dom.DOMImplementationSource源码实例Demo

下面列出了怎么用org.w3c.dom.DOMImplementationSource的API类实例代码及写法,或者点击链接到github查看源代码。

/**
 * Return the first implementation that has the desired
 * features, or <code>null</code> if none is found.
 *
 * @param features
 *            A string that specifies which features are required. This is
 *            a space separated list in which each feature is specified by
 *            its name optionally followed by a space and a version number.
 *            This is something like: "XML 1.0 Traversal +Events 2.0"
 * @return An implementation that has the desired features,
 *         or <code>null</code> if none found.
 */
public DOMImplementation getDOMImplementation(final String features) {
    int size = sources.size();
    String name = null;
    for (int i = 0; i < size; i++) {
        DOMImplementationSource source =
            (DOMImplementationSource) sources.elementAt(i);
        DOMImplementation impl = source.getDOMImplementation(features);
        if (impl != null) {
            return impl;
        }
    }
    return null;
}
 
/**
 * Return a list of implementations that support the
 * desired features.
 *
 * @param features
 *            A string that specifies which features are required. This is
 *            a space separated list in which each feature is specified by
 *            its name optionally followed by a space and a version number.
 *            This is something like: "XML 1.0 Traversal +Events 2.0"
 * @return A list of DOMImplementations that support the desired features.
 */
public DOMImplementationList getDOMImplementationList(final String features) {
    final Vector implementations = new Vector();
    int size = sources.size();
    for (int i = 0; i < size; i++) {
        DOMImplementationSource source =
            (DOMImplementationSource) sources.elementAt(i);
        DOMImplementationList impls =
            source.getDOMImplementationList(features);
        for (int j = 0; j < impls.getLength(); j++) {
            DOMImplementation impl = impls.item(j);
            implementations.addElement(impl);
        }
    }
    return new DOMImplementationList() {
            public DOMImplementation item(final int index) {
                if (index >= 0 && index < implementations.size()) {
                    try {
                        return (DOMImplementation)
                            implementations.elementAt(index);
                    } catch (ArrayIndexOutOfBoundsException e) {
                        return null;
                    }
                }
                return null;
            }

            public int getLength() {
                return implementations.size();
            }
        };
}
 
/**
 * Register an implementation.
 *
 * @param s The source to be registered, may not be <code>null</code>
 */
public void addSource(final DOMImplementationSource s) {
    if (s == null) {
        throw new NullPointerException();
    }
    if (!sources.contains(s)) {
        sources.addElement(s);
    }
}
 
源代码4 项目: TencentKona-8   文件: DOMImplementationRegistry.java
/**
 * Return the first implementation that has the desired
 * features, or <code>null</code> if none is found.
 *
 * @param features
 *            A string that specifies which features are required. This is
 *            a space separated list in which each feature is specified by
 *            its name optionally followed by a space and a version number.
 *            This is something like: "XML 1.0 Traversal +Events 2.0"
 * @return An implementation that has the desired features,
 *         or <code>null</code> if none found.
 */
public DOMImplementation getDOMImplementation(final String features) {
    int size = sources.size();
    String name = null;
    for (int i = 0; i < size; i++) {
        DOMImplementationSource source =
            (DOMImplementationSource) sources.elementAt(i);
        DOMImplementation impl = source.getDOMImplementation(features);
        if (impl != null) {
            return impl;
        }
    }
    return null;
}
 
源代码5 项目: TencentKona-8   文件: DOMImplementationRegistry.java
/**
 * Return a list of implementations that support the
 * desired features.
 *
 * @param features
 *            A string that specifies which features are required. This is
 *            a space separated list in which each feature is specified by
 *            its name optionally followed by a space and a version number.
 *            This is something like: "XML 1.0 Traversal +Events 2.0"
 * @return A list of DOMImplementations that support the desired features.
 */
public DOMImplementationList getDOMImplementationList(final String features) {
    final Vector implementations = new Vector();
    int size = sources.size();
    for (int i = 0; i < size; i++) {
        DOMImplementationSource source =
            (DOMImplementationSource) sources.elementAt(i);
        DOMImplementationList impls =
            source.getDOMImplementationList(features);
        for (int j = 0; j < impls.getLength(); j++) {
            DOMImplementation impl = impls.item(j);
            implementations.addElement(impl);
        }
    }
    return new DOMImplementationList() {
            public DOMImplementation item(final int index) {
                if (index >= 0 && index < implementations.size()) {
                    try {
                        return (DOMImplementation)
                            implementations.elementAt(index);
                    } catch (ArrayIndexOutOfBoundsException e) {
                        return null;
                    }
                }
                return null;
            }

            public int getLength() {
                return implementations.size();
            }
        };
}
 
源代码6 项目: TencentKona-8   文件: DOMImplementationRegistry.java
/**
 * Register an implementation.
 *
 * @param s The source to be registered, may not be <code>null</code>
 */
public void addSource(final DOMImplementationSource s) {
    if (s == null) {
        throw new NullPointerException();
    }
    if (!sources.contains(s)) {
        sources.addElement(s);
    }
}
 
源代码7 项目: jdk8u60   文件: DOMImplementationRegistry.java
/**
 * Return the first implementation that has the desired
 * features, or <code>null</code> if none is found.
 *
 * @param features
 *            A string that specifies which features are required. This is
 *            a space separated list in which each feature is specified by
 *            its name optionally followed by a space and a version number.
 *            This is something like: "XML 1.0 Traversal +Events 2.0"
 * @return An implementation that has the desired features,
 *         or <code>null</code> if none found.
 */
public DOMImplementation getDOMImplementation(final String features) {
    int size = sources.size();
    String name = null;
    for (int i = 0; i < size; i++) {
        DOMImplementationSource source =
            (DOMImplementationSource) sources.elementAt(i);
        DOMImplementation impl = source.getDOMImplementation(features);
        if (impl != null) {
            return impl;
        }
    }
    return null;
}
 
源代码8 项目: jdk8u60   文件: DOMImplementationRegistry.java
/**
 * Return a list of implementations that support the
 * desired features.
 *
 * @param features
 *            A string that specifies which features are required. This is
 *            a space separated list in which each feature is specified by
 *            its name optionally followed by a space and a version number.
 *            This is something like: "XML 1.0 Traversal +Events 2.0"
 * @return A list of DOMImplementations that support the desired features.
 */
public DOMImplementationList getDOMImplementationList(final String features) {
    final Vector implementations = new Vector();
    int size = sources.size();
    for (int i = 0; i < size; i++) {
        DOMImplementationSource source =
            (DOMImplementationSource) sources.elementAt(i);
        DOMImplementationList impls =
            source.getDOMImplementationList(features);
        for (int j = 0; j < impls.getLength(); j++) {
            DOMImplementation impl = impls.item(j);
            implementations.addElement(impl);
        }
    }
    return new DOMImplementationList() {
            public DOMImplementation item(final int index) {
                if (index >= 0 && index < implementations.size()) {
                    try {
                        return (DOMImplementation)
                            implementations.elementAt(index);
                    } catch (ArrayIndexOutOfBoundsException e) {
                        return null;
                    }
                }
                return null;
            }

            public int getLength() {
                return implementations.size();
            }
        };
}
 
源代码9 项目: jdk8u60   文件: DOMImplementationRegistry.java
/**
 * Register an implementation.
 *
 * @param s The source to be registered, may not be <code>null</code>
 */
public void addSource(final DOMImplementationSource s) {
    if (s == null) {
        throw new NullPointerException();
    }
    if (!sources.contains(s)) {
        sources.addElement(s);
    }
}
 
/**
 * Return the first implementation that has the desired
 * features, or <code>null</code> if none is found.
 *
 * @param features
 *            A string that specifies which features are required. This is
 *            a space separated list in which each feature is specified by
 *            its name optionally followed by a space and a version number.
 *            This is something like: "XML 1.0 Traversal +Events 2.0"
 * @return An implementation that has the desired features,
 *         or <code>null</code> if none found.
 */
public DOMImplementation getDOMImplementation(final String features) {
    int size = sources.size();
    String name = null;
    for (int i = 0; i < size; i++) {
        DOMImplementationSource source =
            (DOMImplementationSource) sources.elementAt(i);
        DOMImplementation impl = source.getDOMImplementation(features);
        if (impl != null) {
            return impl;
        }
    }
    return null;
}
 
/**
 * Return a list of implementations that support the
 * desired features.
 *
 * @param features
 *            A string that specifies which features are required. This is
 *            a space separated list in which each feature is specified by
 *            its name optionally followed by a space and a version number.
 *            This is something like: "XML 1.0 Traversal +Events 2.0"
 * @return A list of DOMImplementations that support the desired features.
 */
public DOMImplementationList getDOMImplementationList(final String features) {
    final Vector implementations = new Vector();
    int size = sources.size();
    for (int i = 0; i < size; i++) {
        DOMImplementationSource source =
            (DOMImplementationSource) sources.elementAt(i);
        DOMImplementationList impls =
            source.getDOMImplementationList(features);
        for (int j = 0; j < impls.getLength(); j++) {
            DOMImplementation impl = impls.item(j);
            implementations.addElement(impl);
        }
    }
    return new DOMImplementationList() {
            public DOMImplementation item(final int index) {
                if (index >= 0 && index < implementations.size()) {
                    try {
                        return (DOMImplementation)
                            implementations.elementAt(index);
                    } catch (ArrayIndexOutOfBoundsException e) {
                        return null;
                    }
                }
                return null;
            }

            public int getLength() {
                return implementations.size();
            }
        };
}
 
/**
 * Register an implementation.
 *
 * @param s The source to be registered, may not be <code>null</code>
 */
public void addSource(final DOMImplementationSource s) {
    if (s == null) {
        throw new NullPointerException();
    }
    if (!sources.contains(s)) {
        sources.addElement(s);
    }
}
 
源代码13 项目: openjdk-jdk8u   文件: DOMImplementationRegistry.java
/**
 * Return the first implementation that has the desired
 * features, or <code>null</code> if none is found.
 *
 * @param features
 *            A string that specifies which features are required. This is
 *            a space separated list in which each feature is specified by
 *            its name optionally followed by a space and a version number.
 *            This is something like: "XML 1.0 Traversal +Events 2.0"
 * @return An implementation that has the desired features,
 *         or <code>null</code> if none found.
 */
public DOMImplementation getDOMImplementation(final String features) {
    int size = sources.size();
    String name = null;
    for (int i = 0; i < size; i++) {
        DOMImplementationSource source =
            (DOMImplementationSource) sources.elementAt(i);
        DOMImplementation impl = source.getDOMImplementation(features);
        if (impl != null) {
            return impl;
        }
    }
    return null;
}
 
源代码14 项目: openjdk-jdk8u   文件: DOMImplementationRegistry.java
/**
 * Return a list of implementations that support the
 * desired features.
 *
 * @param features
 *            A string that specifies which features are required. This is
 *            a space separated list in which each feature is specified by
 *            its name optionally followed by a space and a version number.
 *            This is something like: "XML 1.0 Traversal +Events 2.0"
 * @return A list of DOMImplementations that support the desired features.
 */
public DOMImplementationList getDOMImplementationList(final String features) {
    final Vector implementations = new Vector();
    int size = sources.size();
    for (int i = 0; i < size; i++) {
        DOMImplementationSource source =
            (DOMImplementationSource) sources.elementAt(i);
        DOMImplementationList impls =
            source.getDOMImplementationList(features);
        for (int j = 0; j < impls.getLength(); j++) {
            DOMImplementation impl = impls.item(j);
            implementations.addElement(impl);
        }
    }
    return new DOMImplementationList() {
            public DOMImplementation item(final int index) {
                if (index >= 0 && index < implementations.size()) {
                    try {
                        return (DOMImplementation)
                            implementations.elementAt(index);
                    } catch (ArrayIndexOutOfBoundsException e) {
                        return null;
                    }
                }
                return null;
            }

            public int getLength() {
                return implementations.size();
            }
        };
}
 
源代码15 项目: openjdk-jdk8u   文件: DOMImplementationRegistry.java
/**
 * Register an implementation.
 *
 * @param s The source to be registered, may not be <code>null</code>
 */
public void addSource(final DOMImplementationSource s) {
    if (s == null) {
        throw new NullPointerException();
    }
    if (!sources.contains(s)) {
        sources.addElement(s);
    }
}
 
/**
 * Return the first implementation that has the desired
 * features, or <code>null</code> if none is found.
 *
 * @param features
 *            A string that specifies which features are required. This is
 *            a space separated list in which each feature is specified by
 *            its name optionally followed by a space and a version number.
 *            This is something like: "XML 1.0 Traversal +Events 2.0"
 * @return An implementation that has the desired features,
 *         or <code>null</code> if none found.
 */
public DOMImplementation getDOMImplementation(final String features) {
    int size = sources.size();
    String name = null;
    for (int i = 0; i < size; i++) {
        DOMImplementationSource source =
            (DOMImplementationSource) sources.elementAt(i);
        DOMImplementation impl = source.getDOMImplementation(features);
        if (impl != null) {
            return impl;
        }
    }
    return null;
}
 
/**
 * Return a list of implementations that support the
 * desired features.
 *
 * @param features
 *            A string that specifies which features are required. This is
 *            a space separated list in which each feature is specified by
 *            its name optionally followed by a space and a version number.
 *            This is something like: "XML 1.0 Traversal +Events 2.0"
 * @return A list of DOMImplementations that support the desired features.
 */
public DOMImplementationList getDOMImplementationList(final String features) {
    final Vector implementations = new Vector();
    int size = sources.size();
    for (int i = 0; i < size; i++) {
        DOMImplementationSource source =
            (DOMImplementationSource) sources.elementAt(i);
        DOMImplementationList impls =
            source.getDOMImplementationList(features);
        for (int j = 0; j < impls.getLength(); j++) {
            DOMImplementation impl = impls.item(j);
            implementations.addElement(impl);
        }
    }
    return new DOMImplementationList() {
            public DOMImplementation item(final int index) {
                if (index >= 0 && index < implementations.size()) {
                    try {
                        return (DOMImplementation)
                            implementations.elementAt(index);
                    } catch (ArrayIndexOutOfBoundsException e) {
                        return null;
                    }
                }
                return null;
            }

            public int getLength() {
                return implementations.size();
            }
        };
}
 
/**
 * Register an implementation.
 *
 * @param s The source to be registered, may not be <code>null</code>
 */
public void addSource(final DOMImplementationSource s) {
    if (s == null) {
        throw new NullPointerException();
    }
    if (!sources.contains(s)) {
        sources.addElement(s);
    }
}
 
源代码19 项目: Bytecoder   文件: DOMImplementationRegistry.java
/**
 * Return the first implementation that has the desired
 * features, or <code>null</code> if none is found.
 *
 * @param features
 *            A string that specifies which features are required. This is
 *            a space separated list in which each feature is specified by
 *            its name optionally followed by a space and a version number.
 *            This is something like: "XML 1.0 Traversal +Events 2.0"
 * @return An implementation that has the desired features,
 *         or <code>null</code> if none found.
 */
public DOMImplementation getDOMImplementation(final String features) {
    int size = sources.size();
    String name = null;
    for (int i = 0; i < size; i++) {
        DOMImplementationSource source = sources.get(i);
        DOMImplementation impl = source.getDOMImplementation(features);
        if (impl != null) {
            return impl;
        }
    }
    return null;
}
 
源代码20 项目: Bytecoder   文件: DOMImplementationRegistry.java
/**
 * Return a list of implementations that support the
 * desired features.
 *
 * @param features
 *            A string that specifies which features are required. This is
 *            a space separated list in which each feature is specified by
 *            its name optionally followed by a space and a version number.
 *            This is something like: "XML 1.0 Traversal +Events 2.0"
 * @return A list of DOMImplementations that support the desired features.
 */
public DOMImplementationList getDOMImplementationList(final String features) {
    final List<DOMImplementation> implementations = new ArrayList<>();
    int size = sources.size();
    for (int i = 0; i < size; i++) {
        DOMImplementationSource source = sources.get(i);
        DOMImplementationList impls =
            source.getDOMImplementationList(features);
        for (int j = 0; j < impls.getLength(); j++) {
            DOMImplementation impl = impls.item(j);
            implementations.add(impl);
        }
    }
    return new DOMImplementationList() {
            public DOMImplementation item(final int index) {
                if (index >= 0 && index < implementations.size()) {
                    try {
                        return implementations.get(index);
                    } catch (IndexOutOfBoundsException e) {
                        return null;
                    }
                }
                return null;
            }

            public int getLength() {
                return implementations.size();
            }
        };
}
 
源代码21 项目: Bytecoder   文件: DOMImplementationRegistry.java
/**
 * Register an implementation.
 *
 * @param s The source to be registered, may not be <code>null</code>
 */
public void addSource(final DOMImplementationSource s) {
    if (s == null) {
        throw new NullPointerException();
    }
    if (!sources.contains(s)) {
        sources.add(s);
    }
}
 
源代码22 项目: openjdk-jdk9   文件: DOMImplementationRegistry.java
/**
 * Return the first implementation that has the desired
 * features, or <code>null</code> if none is found.
 *
 * @param features
 *            A string that specifies which features are required. This is
 *            a space separated list in which each feature is specified by
 *            its name optionally followed by a space and a version number.
 *            This is something like: "XML 1.0 Traversal +Events 2.0"
 * @return An implementation that has the desired features,
 *         or <code>null</code> if none found.
 */
public DOMImplementation getDOMImplementation(final String features) {
    int size = sources.size();
    String name = null;
    for (int i = 0; i < size; i++) {
        DOMImplementationSource source =
            (DOMImplementationSource) sources.elementAt(i);
        DOMImplementation impl = source.getDOMImplementation(features);
        if (impl != null) {
            return impl;
        }
    }
    return null;
}
 
源代码23 项目: openjdk-jdk9   文件: DOMImplementationRegistry.java
/**
 * Return a list of implementations that support the
 * desired features.
 *
 * @param features
 *            A string that specifies which features are required. This is
 *            a space separated list in which each feature is specified by
 *            its name optionally followed by a space and a version number.
 *            This is something like: "XML 1.0 Traversal +Events 2.0"
 * @return A list of DOMImplementations that support the desired features.
 */
public DOMImplementationList getDOMImplementationList(final String features) {
    final Vector implementations = new Vector();
    int size = sources.size();
    for (int i = 0; i < size; i++) {
        DOMImplementationSource source =
            (DOMImplementationSource) sources.elementAt(i);
        DOMImplementationList impls =
            source.getDOMImplementationList(features);
        for (int j = 0; j < impls.getLength(); j++) {
            DOMImplementation impl = impls.item(j);
            implementations.addElement(impl);
        }
    }
    return new DOMImplementationList() {
            public DOMImplementation item(final int index) {
                if (index >= 0 && index < implementations.size()) {
                    try {
                        return (DOMImplementation)
                            implementations.elementAt(index);
                    } catch (ArrayIndexOutOfBoundsException e) {
                        return null;
                    }
                }
                return null;
            }

            public int getLength() {
                return implementations.size();
            }
        };
}
 
源代码24 项目: openjdk-jdk9   文件: DOMImplementationRegistry.java
/**
 * Register an implementation.
 *
 * @param s The source to be registered, may not be <code>null</code>
 */
public void addSource(final DOMImplementationSource s) {
    if (s == null) {
        throw new NullPointerException();
    }
    if (!sources.contains(s)) {
        sources.addElement(s);
    }
}
 
源代码25 项目: Java8CN   文件: DOMImplementationRegistry.java
/**
 * Return the first implementation that has the desired
 * features, or <code>null</code> if none is found.
 *
 * @param features
 *            A string that specifies which features are required. This is
 *            a space separated list in which each feature is specified by
 *            its name optionally followed by a space and a version number.
 *            This is something like: "XML 1.0 Traversal +Events 2.0"
 * @return An implementation that has the desired features,
 *         or <code>null</code> if none found.
 */
public DOMImplementation getDOMImplementation(final String features) {
    int size = sources.size();
    String name = null;
    for (int i = 0; i < size; i++) {
        DOMImplementationSource source =
            (DOMImplementationSource) sources.elementAt(i);
        DOMImplementation impl = source.getDOMImplementation(features);
        if (impl != null) {
            return impl;
        }
    }
    return null;
}
 
源代码26 项目: Java8CN   文件: DOMImplementationRegistry.java
/**
 * Return a list of implementations that support the
 * desired features.
 *
 * @param features
 *            A string that specifies which features are required. This is
 *            a space separated list in which each feature is specified by
 *            its name optionally followed by a space and a version number.
 *            This is something like: "XML 1.0 Traversal +Events 2.0"
 * @return A list of DOMImplementations that support the desired features.
 */
public DOMImplementationList getDOMImplementationList(final String features) {
    final Vector implementations = new Vector();
    int size = sources.size();
    for (int i = 0; i < size; i++) {
        DOMImplementationSource source =
            (DOMImplementationSource) sources.elementAt(i);
        DOMImplementationList impls =
            source.getDOMImplementationList(features);
        for (int j = 0; j < impls.getLength(); j++) {
            DOMImplementation impl = impls.item(j);
            implementations.addElement(impl);
        }
    }
    return new DOMImplementationList() {
            public DOMImplementation item(final int index) {
                if (index >= 0 && index < implementations.size()) {
                    try {
                        return (DOMImplementation)
                            implementations.elementAt(index);
                    } catch (ArrayIndexOutOfBoundsException e) {
                        return null;
                    }
                }
                return null;
            }

            public int getLength() {
                return implementations.size();
            }
        };
}
 
源代码27 项目: Java8CN   文件: DOMImplementationRegistry.java
/**
 * Register an implementation.
 *
 * @param s The source to be registered, may not be <code>null</code>
 */
public void addSource(final DOMImplementationSource s) {
    if (s == null) {
        throw new NullPointerException();
    }
    if (!sources.contains(s)) {
        sources.addElement(s);
    }
}
 
源代码28 项目: hottub   文件: DOMImplementationRegistry.java
/**
 * Return the first implementation that has the desired
 * features, or <code>null</code> if none is found.
 *
 * @param features
 *            A string that specifies which features are required. This is
 *            a space separated list in which each feature is specified by
 *            its name optionally followed by a space and a version number.
 *            This is something like: "XML 1.0 Traversal +Events 2.0"
 * @return An implementation that has the desired features,
 *         or <code>null</code> if none found.
 */
public DOMImplementation getDOMImplementation(final String features) {
    int size = sources.size();
    String name = null;
    for (int i = 0; i < size; i++) {
        DOMImplementationSource source =
            (DOMImplementationSource) sources.elementAt(i);
        DOMImplementation impl = source.getDOMImplementation(features);
        if (impl != null) {
            return impl;
        }
    }
    return null;
}
 
源代码29 项目: hottub   文件: DOMImplementationRegistry.java
/**
 * Return a list of implementations that support the
 * desired features.
 *
 * @param features
 *            A string that specifies which features are required. This is
 *            a space separated list in which each feature is specified by
 *            its name optionally followed by a space and a version number.
 *            This is something like: "XML 1.0 Traversal +Events 2.0"
 * @return A list of DOMImplementations that support the desired features.
 */
public DOMImplementationList getDOMImplementationList(final String features) {
    final Vector implementations = new Vector();
    int size = sources.size();
    for (int i = 0; i < size; i++) {
        DOMImplementationSource source =
            (DOMImplementationSource) sources.elementAt(i);
        DOMImplementationList impls =
            source.getDOMImplementationList(features);
        for (int j = 0; j < impls.getLength(); j++) {
            DOMImplementation impl = impls.item(j);
            implementations.addElement(impl);
        }
    }
    return new DOMImplementationList() {
            public DOMImplementation item(final int index) {
                if (index >= 0 && index < implementations.size()) {
                    try {
                        return (DOMImplementation)
                            implementations.elementAt(index);
                    } catch (ArrayIndexOutOfBoundsException e) {
                        return null;
                    }
                }
                return null;
            }

            public int getLength() {
                return implementations.size();
            }
        };
}
 
源代码30 项目: hottub   文件: DOMImplementationRegistry.java
/**
 * Register an implementation.
 *
 * @param s The source to be registered, may not be <code>null</code>
 */
public void addSource(final DOMImplementationSource s) {
    if (s == null) {
        throw new NullPointerException();
    }
    if (!sources.contains(s)) {
        sources.addElement(s);
    }
}
 
 类所在包
 同包方法