/*
 * Decompiled with CFR 0_110.
 * 
 * Could not load the following classes:
 *  java.io.IOException
 *  java.io.StringWriter
 *  java.io.Writer
 *  java.lang.String
 *  java.lang.StringBuffer
 */
package org.dom4j.tree;

import java.io.IOException;
import java.io.StringWriter;
import java.io.Writer;
import org.dom4j.CDATA;
import org.dom4j.Visitor;
import org.dom4j.tree.AbstractCharacterData;

public abstract class AbstractCDATA
extends AbstractCharacterData
implements CDATA {
    @Override
    public void accept(Visitor visitor) {
        visitor.visit((CDATA)this);
    }

    /*
     * Enabled force condition propagation
     * Lifted jumps to return sites
     */
    @Override
    public String asXML() {
        StringWriter stringWriter = new StringWriter();
        try {
            this.write((Writer)stringWriter);
        }
        catch (IOException var2_2) {
            return stringWriter.toString();
        }
        do {
            return stringWriter.toString();
            break;
        } while (true);
    }

    @Override
    public short getNodeType() {
        return 4;
    }

    public String toString() {
        return new StringBuffer().append(super.toString()).append(" [CDATA: \"").append(this.getText()).append("\"]").toString();
    }

    @Override
    public void write(Writer writer) throws IOException {
        writer.write("<![CDATA[");
        if (this.getText() != null) {
            writer.write(this.getText());
        }
        writer.write("]]>");
    }
}

