/*
 * Decompiled with CFR 0_110.
 * 
 * Could not load the following classes:
 *  java.lang.Object
 *  java.lang.String
 *  java.lang.StringBuffer
 */
package org.dom4j.util;

import org.dom4j.DocumentFactory;
import org.dom4j.Element;
import org.dom4j.QName;
import org.dom4j.tree.DefaultElement;

public class UserDataElement
extends DefaultElement {
    private Object data;

    public UserDataElement(String string2) {
        super(string2);
    }

    public UserDataElement(QName qName) {
        super(qName);
    }

    @Override
    public Object clone() {
        UserDataElement userDataElement = (UserDataElement)super.clone();
        if (userDataElement != this) {
            userDataElement.data = this.getCopyOfUserData();
        }
        return userDataElement;
    }

    @Override
    protected Element createElement(String string2) {
        Element element = this.getDocumentFactory().createElement(string2);
        element.setData(this.getCopyOfUserData());
        return element;
    }

    @Override
    protected Element createElement(QName qName) {
        Element element = this.getDocumentFactory().createElement(qName);
        element.setData(this.getCopyOfUserData());
        return element;
    }

    protected Object getCopyOfUserData() {
        return this.data;
    }

    @Override
    public Object getData() {
        return this.data;
    }

    @Override
    public void setData(Object object) {
        this.data = object;
    }

    @Override
    public String toString() {
        return new StringBuffer().append(super.toString()).append(" userData: ").append(this.data).toString();
    }
}

