package com.atlassian.stash.internal.backup.liquibase.xml;

import javax.annotation.Nonnull;
import javax.xml.namespace.NamespaceContext;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;

public abstract class DelegatingXmlStreamWriter<T extends XMLStreamWriter> implements XMLStreamWriter {

    @Nonnull
    private final T delegate;

    protected DelegatingXmlStreamWriter(T delegate) {
        this.delegate = delegate;
    }

    @Override
    public void writeStartElement(String s) throws XMLStreamException {
        delegate.writeStartElement(s);
    }

    @Override
    public void writeStartElement(String s, String s1) throws XMLStreamException {
        delegate.writeStartElement(s, s1);
    }

    @Override
    public void writeStartElement(String s, String s1, String s2) throws XMLStreamException {
        delegate.writeStartElement(s, s1, s2);
    }

    @Override
    public void writeEmptyElement(String s, String s1) throws XMLStreamException {
        delegate.writeEmptyElement(s, s1);
    }

    @Override
    public void writeEmptyElement(String s, String s1, String s2) throws XMLStreamException {
        delegate.writeEmptyElement(s, s1, s2);
    }

    @Override
    public void writeEmptyElement(String s) throws XMLStreamException {
        delegate.writeEmptyElement(s);
    }

    @Override
    public void writeEndElement() throws XMLStreamException {
        delegate.writeEndElement();
    }

    @Override
    public void writeEndDocument() throws XMLStreamException {
        delegate.writeEndDocument();
    }

    @Override
    public void close() throws XMLStreamException {
        delegate.close();
    }

    @Override
    public void flush() throws XMLStreamException {
        delegate.flush();
    }

    @Override
    public void writeAttribute(String s, String s1) throws XMLStreamException {
        delegate.writeAttribute(s, s1);
    }

    @Override
    public void writeAttribute(String s, String s1, String s2, String s3) throws XMLStreamException {
        delegate.writeAttribute(s, s1, s2, s3);
    }

    @Override
    public void writeAttribute(String s, String s1, String s2) throws XMLStreamException {
        delegate.writeAttribute(s, s1, s2);
    }

    @Override
    public void writeNamespace(String s, String s1) throws XMLStreamException {
        delegate.writeNamespace(s, s1);
    }

    @Override
    public void writeDefaultNamespace(String s) throws XMLStreamException {
        delegate.writeDefaultNamespace(s);
    }

    @Override
    public void writeComment(String s) throws XMLStreamException {
        delegate.writeComment(s);
    }

    @Override
    public void writeProcessingInstruction(String s) throws XMLStreamException {
        delegate.writeProcessingInstruction(s);
    }

    @Override
    public void writeProcessingInstruction(String s, String s1) throws XMLStreamException {
        delegate.writeProcessingInstruction(s, s1);
    }

    @Override
    public void writeCData(String s) throws XMLStreamException {
        delegate.writeCData(s);
    }

    @Override
    public void writeDTD(String s) throws XMLStreamException {
        delegate.writeDTD(s);
    }

    @Override
    public void writeEntityRef(String s) throws XMLStreamException {
        delegate.writeEntityRef(s);
    }

    @Override
    public void writeStartDocument() throws XMLStreamException {
        delegate.writeStartDocument();
    }

    @Override
    public void writeStartDocument(String s) throws XMLStreamException {
        delegate.writeStartDocument(s);
    }

    @Override
    public void writeStartDocument(String s, String s1) throws XMLStreamException {
        delegate.writeStartDocument(s, s1);
    }

    @Override
    public void writeCharacters(String s) throws XMLStreamException {
        delegate.writeCharacters(s);
    }

    @Override
    public void writeCharacters(char[] chars, int i, int i1) throws XMLStreamException {
        delegate.writeCharacters(chars, i, i1);
    }

    @Override
    public String getPrefix(String s) throws XMLStreamException {
        return delegate.getPrefix(s);
    }

    @Override
    public void setPrefix(String s, String s1) throws XMLStreamException {
        delegate.setPrefix(s, s1);
    }

    @Override
    public void setDefaultNamespace(String s) throws XMLStreamException {
        delegate.setDefaultNamespace(s);
    }

    @Override
    public void setNamespaceContext(NamespaceContext namespaceContext) throws XMLStreamException {
        delegate.setNamespaceContext(namespaceContext);
    }

    @Override
    public NamespaceContext getNamespaceContext() {
        return delegate.getNamespaceContext();
    }

    @Override
    public Object getProperty(String s) throws IllegalArgumentException {
        return delegate.getProperty(s);
    }

    protected T getDelegate() {
        return delegate;
    }
}
