/*
 * Decompiled with CFR 0_110.
 * 
 * Could not load the following classes:
 *  java.lang.Class
 *  java.lang.ClassNotFoundException
 *  java.lang.NoClassDefFoundError
 *  java.lang.Object
 *  java.lang.String
 *  java.lang.UnsupportedOperationException
 *  java.util.List
 *  org.xml.sax.Attributes
 */
package org.dom4j.bean;

import java.util.List;
import org.dom4j.Attribute;
import org.dom4j.DocumentFactory;
import org.dom4j.Element;
import org.dom4j.Namespace;
import org.dom4j.QName;
import org.dom4j.bean.BeanAttributeList;
import org.dom4j.bean.BeanDocumentFactory;
import org.dom4j.tree.DefaultElement;
import org.dom4j.tree.NamespaceStack;
import org.xml.sax.Attributes;

public class BeanElement
extends DefaultElement {
    private static final DocumentFactory DOCUMENT_FACTORY = BeanDocumentFactory.getInstance();
    static Class class$org$dom4j$bean$BeanElement;
    private Object bean;

    public BeanElement(String string2, Object object) {
        super(DOCUMENT_FACTORY.createQName(string2), object);
    }

    public BeanElement(String string2, Namespace namespace, Object object) {
        super(DOCUMENT_FACTORY.createQName(string2, namespace), object);
    }

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

    public BeanElement(QName qName, Object object) {
        super(qName);
        this.bean = object;
    }

    static Class class$(String string2) {
        try {
            Class class_ = Class.forName((String)string2);
            return class_;
        }
        catch (ClassNotFoundException var1_2) {
            throw new NoClassDefFoundError(var1_2.getMessage());
        }
    }

    @Override
    public Element addAttribute(String string2, String string3) {
        Attribute attribute = this.attribute(string2);
        if (attribute != null) {
            attribute.setValue(string3);
        }
        return this;
    }

    @Override
    public Element addAttribute(QName qName, String string2) {
        Attribute attribute = this.attribute(qName);
        if (attribute != null) {
            attribute.setValue(string2);
        }
        return this;
    }

    @Override
    public Attribute attribute(String string2) {
        return this.getBeanAttributeList().attribute(string2);
    }

    @Override
    public Attribute attribute(QName qName) {
        return this.getBeanAttributeList().attribute(qName);
    }

    @Override
    protected List createAttributeList() {
        return new BeanAttributeList(this);
    }

    @Override
    protected List createAttributeList(int n) {
        return new BeanAttributeList((BeanElement)this);
    }

    protected BeanAttributeList getBeanAttributeList() {
        return (BeanAttributeList)this.attributeList();
    }

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

    @Override
    protected DocumentFactory getDocumentFactory() {
        return DOCUMENT_FACTORY;
    }

    @Override
    public void setAttributes(List list) {
        throw new UnsupportedOperationException("Not implemented yet.");
    }

    /*
     * Exception decompiling
     */
    @Override
    public void setAttributes(Attributes var1, NamespaceStack var2_3, boolean var3_2) {
        // This method has failed to decompile.  When submitting a bug report, please provide this stack trace, and (if you hold appropriate legal rights) the relevant class file.
        // java.util.ConcurrentModificationException
        // java.util.LinkedList$ReverseLinkIterator.next(LinkedList.java:217)
        // org.benf.cfr.reader.bytecode.analysis.structured.statement.Block.extractLabelledBlocks(Block.java:212)
        // org.benf.cfr.reader.bytecode.analysis.opgraph.Op04StructuredStatement$LabelledBlockExtractor.transform(Op04StructuredStatement.java:485)
        // org.benf.cfr.reader.bytecode.analysis.opgraph.Op04StructuredStatement.transform(Op04StructuredStatement.java:639)
        // org.benf.cfr.reader.bytecode.analysis.opgraph.Op04StructuredStatement.insertLabelledBlocks(Op04StructuredStatement.java:649)
        // org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysisInner(CodeAnalyser.java:816)
        // org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysisOrWrapFail(CodeAnalyser.java:220)
        // org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysis(CodeAnalyser.java:165)
        // org.benf.cfr.reader.entities.attributes.AttributeCode.analyse(AttributeCode.java:91)
        // org.benf.cfr.reader.entities.Method.analyse(Method.java:354)
        // org.benf.cfr.reader.entities.ClassFile.analyseMid(ClassFile.java:751)
        // org.benf.cfr.reader.entities.ClassFile.analyseTop(ClassFile.java:683)
        // org.benf.cfr.reader.Main.doJar(Main.java:128)
        // com.njlabs.showjava.processor.JavaExtractor$1.run(JavaExtractor.java:84)
        // java.lang.Thread.run(Thread.java:818)
        throw new IllegalStateException("Decompilation failed");
    }

    @Override
    public void setData(Object object) {
        this.bean = object;
        this.setAttributeList(null);
    }
}

