思特奇智慧酒店云平台 v0.0.5版本的 MD5 值为:dedb172bb322639d79d7e0e26262fb5c
以下内容为反编译后的 SharedGroupsInfo.java 源代码,内容仅作参考
package org.jivesoftware.smackx.sharedgroups.packet;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.provider.IQProvider;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
public class SharedGroupsInfo extends IQ {
public static final String ELEMENT = "sharedgroup";
public static final String NAMESPACE = "http://www.jivesoftware.org/protocol/sharedgroup";
public final List<String> groups;
public static class Provider extends IQProvider<SharedGroupsInfo> {
@Override
public SharedGroupsInfo parse(XmlPullParser xmlPullParser, int i) throws XmlPullParserException, IOException {
SharedGroupsInfo sharedGroupsInfo = new SharedGroupsInfo();
boolean z = false;
while (!z) {
int next = xmlPullParser.next();
if (next == 2 && xmlPullParser.getName().equals("group")) {
sharedGroupsInfo.getGroups().add(xmlPullParser.nextText());
} else if (next == 3 && xmlPullParser.getName().equals(SharedGroupsInfo.ELEMENT)) {
z = true;
}
}
return sharedGroupsInfo;
}
}
public SharedGroupsInfo() {
super(ELEMENT, NAMESPACE);
this.groups = new ArrayList();
}
public List<String> getGroups() {
return this.groups;
}
@Override
public IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(IQ.IQChildElementXmlStringBuilder iQChildElementXmlStringBuilder) {
iQChildElementXmlStringBuilder.rightAngleBracket();
for (String str : this.groups) {
iQChildElementXmlStringBuilder.element("group", str);
}
return iQChildElementXmlStringBuilder;
}
}