CarrotChat v2.8.60.240131版本的 MD5 值为:2baf8b9f31830b86b5c5a85ae6b47e05

以下内容为反编译后的 BodyQName.java 源代码,内容仅作参考


package org.igniterealtime.jbosh;

import javax.xml.namespace.QName;
public final class BodyQName {
    static final String BOSH_NS_URI = "http://jabber.org/protocol/httpbind";
    private final QName qname;

    private BodyQName(QName qName) {
        this.qname = qName;
    }

    public static BodyQName create(String str, String str2) {
        return createWithPrefix(str, str2, null);
    }

    public static BodyQName createBOSH(String str) {
        return createWithPrefix("http://jabber.org/protocol/httpbind", str, null);
    }

    public static BodyQName createWithPrefix(String str, String str2, String str3) {
        if (str != null && str.length() != 0) {
            if (str2 != null && str2.length() != 0) {
                if (str3 != null && str3.length() != 0) {
                    return new BodyQName(new QName(str, str2, str3));
                }
                return new BodyQName(new QName(str, str2));
            }
            throw new IllegalArgumentException("Local arg is required and may not be null/empty");
        }
        throw new IllegalArgumentException("URI is required and may not be null/empty");
    }

    public boolean equals(Object obj) {
        if (obj instanceof BodyQName) {
            return this.qname.equals(((BodyQName) obj).qname);
        }
        return false;
    }

    public boolean equalsQName(QName qName) {
        return this.qname.equals(qName);
    }

    public String getLocalPart() {
        return this.qname.getLocalPart();
    }

    public String getNamespaceURI() {
        return this.qname.getNamespaceURI();
    }

    public String getPrefix() {
        return this.qname.getPrefix();
    }

    public int hashCode() {
        return this.qname.hashCode();
    }
}