1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-22 14:22:05 +01:00

Add javadoc to Provider

This commit is contained in:
Florian Schmaus 2018-02-21 10:37:25 +01:00
parent ec95bd4422
commit 20b97eb241

View file

@ -1,6 +1,6 @@
/** /**
* *
* Copyright © 2014 Florian Schmaus * Copyright © 2014-2018 Florian Schmaus
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -22,6 +22,17 @@ import org.jivesoftware.smack.util.ParserUtils;
import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParser;
/**
* Smack provider are the parsers used to deserialize raw XMPP into the according Java {@link Element}s.
* <p>
* At any time when {@link #parse(XmlPullParser, int)} is invoked any type of exception can be thrown. If the parsed
* element does not follow the specification, for example by putting a string where only integers are allowed, then a
* {@link org.jivesoftware.smack.SmackException} should be thrown.
* </p>
*
* @author Florian Schmaus
* @param <E> the type of the resulting element.
*/
public abstract class Provider<E extends Element> { public abstract class Provider<E extends Element> {
public final E parse(XmlPullParser parser) throws Exception { public final E parse(XmlPullParser parser) throws Exception {