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

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

源代码1 项目: openjdk-jdk9   文件: IIOMetadataNode.java
/**
 * This DOM Level 3 method is not supported for {@code IIOMetadataNode}
 * and will throw a {@code DOMException}.
 * @throws DOMException always.
 */
public Object setUserData(String key,
                          Object data,
                          UserDataHandler handler) throws DOMException {
    throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
                           "Method not supported");
}
 
源代码2 项目: j2objc   文件: NodeImpl.java
public final Object setUserData(String key, Object data, UserDataHandler handler) {
    if (key == null) {
        throw new NullPointerException("key == null");
    }
    Map<String, UserData> map = document.getUserDataMap(this);
    UserData previous = data == null
            ? map.remove(key)
            : map.put(key, new UserData(data, handler));
    return previous != null ? previous.value : null;
}
 
源代码3 项目: jdk1.8-source-analysis   文件: IIOMetadataNode.java
/**
 * This DOM Level 3 method is not supported for {@code IIOMetadataNode}
 * and will throw a {@code DOMException}.
 * @throws DOMException - always.
 */
public Object setUserData(String key,
                          Object data,
                          UserDataHandler handler) throws DOMException {
    throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
                           "Method not supported");
}
 
源代码4 项目: TencentKona-8   文件: IIOMetadataNode.java
/**
 * This DOM Level 3 method is not supported for {@code IIOMetadataNode}
 * and will throw a {@code DOMException}.
 * @throws DOMException - always.
 */
public Object setUserData(String key,
                          Object data,
                          UserDataHandler handler) throws DOMException {
    throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
                           "Method not supported");
}
 
源代码5 项目: TencentKona-8   文件: NodeImpl.java
/**
 * Returns a duplicate of a given node. You can consider this a
 * generic "copy constructor" for nodes. The newly returned object should
 * be completely independent of the source object's subtree, so changes
 * in one after the clone has been made will not affect the other.
 * <P>
 * Note: since we never have any children deep is meaningless here,
 * ParentNode overrides this behavior.
 * @see ParentNode
 *
 * <p>
 * Example: Cloning a Text node will copy both the node and the text it
 * contains.
 * <p>
 * Example: Cloning something that has children -- Element or Attr, for
 * example -- will _not_ clone those children unless a "deep clone"
 * has been requested. A shallow clone of an Attr node will yield an
 * empty Attr of the same name.
 * <p>
 * NOTE: Clones will always be read/write, even if the node being cloned
 * is read-only, to permit applications using only the DOM API to obtain
 * editable copies of locked portions of the tree.
 */
public Node cloneNode(boolean deep) {

    if (needsSyncData()) {
        synchronizeData();
    }

    NodeImpl newnode;
    try {
        newnode = (NodeImpl)clone();
    }
    catch (CloneNotSupportedException e) {
        // if we get here we have an error in our program we may as well
        // be vocal about it, so that people can take appropriate action.
        throw new RuntimeException("**Internal Error**" + e);
    }

    // Need to break the association w/ original kids
    newnode.ownerNode      = ownerDocument();
    newnode.isOwned(false);

    // By default we make all clones readwrite,
    // this is overriden in readonly subclasses
    newnode.isReadOnly(false);

    ownerDocument().callUserDataHandlers(this, newnode,
                                         UserDataHandler.NODE_CLONED);

    return newnode;

}
 
源代码6 项目: Bytecoder   文件: IIOMetadataNode.java
/**
 * This DOM Level 3 method is not supported for {@code IIOMetadataNode}
 * and will throw a {@code DOMException}.
 * @throws DOMException always.
 */
public Object setUserData(String key,
                          Object data,
                          UserDataHandler handler) throws DOMException {
    throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
                           "Method not supported");
}
 
源代码7 项目: jdk8u60   文件: IIOMetadataNode.java
/**
 * This DOM Level 3 method is not supported for {@code IIOMetadataNode}
 * and will throw a {@code DOMException}.
 * @throws DOMException - always.
 */
public Object setUserData(String key,
                          Object data,
                          UserDataHandler handler) throws DOMException {
    throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
                           "Method not supported");
}
 
源代码8 项目: jdk8u60   文件: NodeImpl.java
/**
 * Returns a duplicate of a given node. You can consider this a
 * generic "copy constructor" for nodes. The newly returned object should
 * be completely independent of the source object's subtree, so changes
 * in one after the clone has been made will not affect the other.
 * <P>
 * Note: since we never have any children deep is meaningless here,
 * ParentNode overrides this behavior.
 * @see ParentNode
 *
 * <p>
 * Example: Cloning a Text node will copy both the node and the text it
 * contains.
 * <p>
 * Example: Cloning something that has children -- Element or Attr, for
 * example -- will _not_ clone those children unless a "deep clone"
 * has been requested. A shallow clone of an Attr node will yield an
 * empty Attr of the same name.
 * <p>
 * NOTE: Clones will always be read/write, even if the node being cloned
 * is read-only, to permit applications using only the DOM API to obtain
 * editable copies of locked portions of the tree.
 */
public Node cloneNode(boolean deep) {

    if (needsSyncData()) {
        synchronizeData();
    }

    NodeImpl newnode;
    try {
        newnode = (NodeImpl)clone();
    }
    catch (CloneNotSupportedException e) {
        // if we get here we have an error in our program we may as well
        // be vocal about it, so that people can take appropriate action.
        throw new RuntimeException("**Internal Error**" + e);
    }

    // Need to break the association w/ original kids
    newnode.ownerNode      = ownerDocument();
    newnode.isOwned(false);

    // By default we make all clones readwrite,
    // this is overriden in readonly subclasses
    newnode.isReadOnly(false);

    ownerDocument().callUserDataHandlers(this, newnode,
                                         UserDataHandler.NODE_CLONED);

    return newnode;

}
 
源代码9 项目: jdk8u-jdk   文件: IIOMetadataNode.java
/**
 * This DOM Level 3 method is not supported for {@code IIOMetadataNode}
 * and will throw a {@code DOMException}.
 * @throws DOMException - always.
 */
public Object setUserData(String key,
                          Object data,
                          UserDataHandler handler) throws DOMException {
    throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
                           "Method not supported");
}
 
源代码10 项目: openjdk-8   文件: IIOMetadataNode.java
/**
 * This DOM Level 3 method is not supported for {@code IIOMetadataNode}
 * and will throw a {@code DOMException}.
 * @throws DOMException - always.
 */
public Object setUserData(String key,
                          Object data,
                          UserDataHandler handler) throws DOMException {
    throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
                           "Method not supported");
}
 
源代码11 项目: JDKSourceCode1.8   文件: IIOMetadataNode.java
/**
 * This DOM Level 3 method is not supported for {@code IIOMetadataNode}
 * and will throw a {@code DOMException}.
 * @throws DOMException - always.
 */
public Object setUserData(String key,
                          Object data,
                          UserDataHandler handler) throws DOMException {
    throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
                           "Method not supported");
}
 
源代码12 项目: htmlunit   文件: DomNode.java
/**
 * {@inheritDoc}
 */
@Override
public Object setUserData(final String key, final Object data, final UserDataHandler handler) {
    if (userData_ == null) {
        userData_ = new HashMap<>();
    }
    return userData_.put(key, data);
}
 
源代码13 项目: HtmlUnit-Android   文件: DomNode.java
/**
 * {@inheritDoc}
 */
@Override
public Object setUserData(final String key, final Object data, final UserDataHandler handler) {
    if (userData_ == null) {
        userData_ = new HashMap<>();
    }
    return userData_.put(key, data);
}
 
源代码14 项目: hottub   文件: IIOMetadataNode.java
/**
 * This DOM Level 3 method is not supported for {@code IIOMetadataNode}
 * and will throw a {@code DOMException}.
 * @throws DOMException - always.
 */
public Object setUserData(String key,
                          Object data,
                          UserDataHandler handler) throws DOMException {
    throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
                           "Method not supported");
}
 
源代码15 项目: openjdk-8-source   文件: NodeImpl.java
/**
 * Returns a duplicate of a given node. You can consider this a
 * generic "copy constructor" for nodes. The newly returned object should
 * be completely independent of the source object's subtree, so changes
 * in one after the clone has been made will not affect the other.
 * <P>
 * Note: since we never have any children deep is meaningless here,
 * ParentNode overrides this behavior.
 * @see ParentNode
 *
 * <p>
 * Example: Cloning a Text node will copy both the node and the text it
 * contains.
 * <p>
 * Example: Cloning something that has children -- Element or Attr, for
 * example -- will _not_ clone those children unless a "deep clone"
 * has been requested. A shallow clone of an Attr node will yield an
 * empty Attr of the same name.
 * <p>
 * NOTE: Clones will always be read/write, even if the node being cloned
 * is read-only, to permit applications using only the DOM API to obtain
 * editable copies of locked portions of the tree.
 */
public Node cloneNode(boolean deep) {

    if (needsSyncData()) {
        synchronizeData();
    }

    NodeImpl newnode;
    try {
        newnode = (NodeImpl)clone();
    }
    catch (CloneNotSupportedException e) {
        // if we get here we have an error in our program we may as well
        // be vocal about it, so that people can take appropriate action.
        throw new RuntimeException("**Internal Error**" + e);
    }

    // Need to break the association w/ original kids
    newnode.ownerNode      = ownerDocument();
    newnode.isOwned(false);

    // By default we make all clones readwrite,
    // this is overriden in readonly subclasses
    newnode.isReadOnly(false);

    ownerDocument().callUserDataHandlers(this, newnode,
                                         UserDataHandler.NODE_CLONED);

    return newnode;

}
 
源代码16 项目: jdk8u_jdk   文件: IIOMetadataNode.java
/**
 * This DOM Level 3 method is not supported for {@code IIOMetadataNode}
 * and will throw a {@code DOMException}.
 * @throws DOMException - always.
 */
public Object setUserData(String key,
                          Object data,
                          UserDataHandler handler) throws DOMException {
    throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
                           "Method not supported");
}
 
源代码17 项目: latexdraw   文件: SVGAttr.java
@Override
public Object setUserData(final String key, final Object data, final UserDataHandler handler) {
	throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED);
}
 
源代码18 项目: jdk1.8-source-analysis   文件: ParentNode.java
UserDataRecord(Object data, UserDataHandler handler) {
    fData = data;
    fHandler = handler;
}
 
源代码19 项目: hottub   文件: XPathNamespaceImpl.java
public Object setUserData(String key,
                          Object data,
                          UserDataHandler handler) {
    return null; //PENDING
}
 
源代码20 项目: jdk1.8-source-analysis   文件: DTMNodeProxy.java
@Override
public Object setUserData(String key,
                          Object data,
                          UserDataHandler handler) {
    return getOwnerDocument().setUserData( key, data, handler);
}
 
源代码21 项目: hottub   文件: DTMNodeProxy.java
@Override
public Object setUserData(String key,
                          Object data,
                          UserDataHandler handler) {
    return getOwnerDocument().setUserData( key, data, handler);
}
 
源代码22 项目: TencentKona-8   文件: ParentNode.java
UserDataRecord(Object data, UserDataHandler handler) {
    fData = data;
    fHandler = handler;
}
 
源代码23 项目: TencentKona-8   文件: UnImplNode.java
public Object setUserData(String key,
                          Object data,
                          UserDataHandler handler) {
    return getOwnerDocument().setUserData( key, data, handler);
}
 
源代码24 项目: TencentKona-8   文件: DTMNodeProxy.java
@Override
public Object setUserData(String key,
                          Object data,
                          UserDataHandler handler) {
    return getOwnerDocument().setUserData( key, data, handler);
}
 
源代码25 项目: TencentKona-8   文件: XPathNamespaceImpl.java
public Object setUserData(String key,
                          Object data,
                          UserDataHandler handler) {
    return null; //PENDING
}
 
@Override
public Object setUserData(String key, Object data, UserDataHandler handler) {
    return null;
}
 
源代码27 项目: openjdk-jdk9   文件: DTMNodeProxy.java
@Override
public Object setUserData(String key,
                          Object data,
                          UserDataHandler handler) {
    return getOwnerDocument().setUserData( key, data, handler);
}
 
源代码28 项目: jdk8u60   文件: UnImplNode.java
public Object setUserData(String key,
                          Object data,
                          UserDataHandler handler) {
    return getOwnerDocument().setUserData( key, data, handler);
}
 
源代码29 项目: jdk8u60   文件: DTMNodeProxy.java
@Override
public Object setUserData(String key,
                          Object data,
                          UserDataHandler handler) {
    return getOwnerDocument().setUserData( key, data, handler);
}
 
源代码30 项目: jdk8u60   文件: XPathNamespaceImpl.java
public Object setUserData(String key,
                          Object data,
                          UserDataHandler handler) {
    return null; //PENDING
}
 
 类所在包
 类方法
 同包方法