/*
 * Decompiled with CFR 0.152.
 */
package org.jivesoftware.smack.provider;

import java.io.IOException;
import org.jivesoftware.smack.SmackException;
import org.jivesoftware.smack.packet.Element;
import org.jivesoftware.smack.util.ParserUtils;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;

public abstract class Provider<E extends Element> {
    public final E parse(XmlPullParser parser) throws XmlPullParserException, IOException, SmackException {
        ParserUtils.assertAtStartTag(parser);
        int initialDepth = parser.getDepth();
        E e = this.parse(parser, initialDepth);
        ParserUtils.forwardToEndTagOfDepth(parser, initialDepth);
        return e;
    }

    public abstract E parse(XmlPullParser var1, int var2) throws XmlPullParserException, IOException, SmackException;
}
