Home / Class/ XmlElement Class — netty Architecture

XmlElement Class — netty Architecture

Architecture documentation for the XmlElement class in XmlElement.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  09cd9880_5da2_18d8_bfc6_fc3b6120ae15["XmlElement"]
  0304c104_fdd8_34d2_88f4_5dc71053520d["XmlElement.java"]
  09cd9880_5da2_18d8_bfc6_fc3b6120ae15 -->|defined in| 0304c104_fdd8_34d2_88f4_5dc71053520d
  1bb3af19_c5ab_3f97_852e_525a892a4b02["XmlElement()"]
  09cd9880_5da2_18d8_bfc6_fc3b6120ae15 -->|method| 1bb3af19_c5ab_3f97_852e_525a892a4b02
  213a3b54_238f_0d5e_b73a_54230e7fa1cf["String()"]
  09cd9880_5da2_18d8_bfc6_fc3b6120ae15 -->|method| 213a3b54_238f_0d5e_b73a_54230e7fa1cf
  180c8f0f_4ec0_a2a9_4be9_1bc00dcd9ce1["namespaces()"]
  09cd9880_5da2_18d8_bfc6_fc3b6120ae15 -->|method| 180c8f0f_4ec0_a2a9_4be9_1bc00dcd9ce1
  4bece77a_d735_60a5_2a3c_f1e05e51f53b["equals()"]
  09cd9880_5da2_18d8_bfc6_fc3b6120ae15 -->|method| 4bece77a_d735_60a5_2a3c_f1e05e51f53b
  c16bf544_9ff0_775e_cc4e_2fe781337005["hashCode()"]
  09cd9880_5da2_18d8_bfc6_fc3b6120ae15 -->|method| c16bf544_9ff0_775e_cc4e_2fe781337005

Relationship Graph

Source Code

codec-xml/src/main/java/io/netty/handler/codec/xml/XmlElement.java lines 25–99

public abstract class XmlElement {

    private final String name;
    private final String namespace;
    private final String prefix;

    private final List<XmlNamespace> namespaces = new ArrayList<XmlNamespace>();

    protected XmlElement(String name, String namespace, String prefix) {
        this.name = name;
        this.namespace = namespace;
        this.prefix = prefix;
    }

    public String name() {
        return name;
    }

    public String namespace() {
        return namespace;
    }

    public String prefix() {
        return prefix;
    }

    public List<XmlNamespace> namespaces() {
        return namespaces;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        XmlElement that = (XmlElement) o;

        if (!name.equals(that.name)) {
            return false;
        }
        if (namespace != null ? !namespace.equals(that.namespace) : that.namespace != null) {
            return false;
        }
        if (!namespaces.equals(that.namespaces)) {
            return false;
        }
        if (prefix != null ? !prefix.equals(that.prefix) : that.prefix != null) {
            return false;
        }

        return true;
    }

    @Override
    public int hashCode() {
        int result = name.hashCode();
        result = 31 * result + (namespace != null ? namespace.hashCode() : 0);
        result = 31 * result + (prefix != null ? prefix.hashCode() : 0);
        result = 31 * result + namespaces.hashCode();
        return result;
    }

    @Override
    public String toString() {
        return ", name='" + name + '\'' +
                ", namespace='" + namespace + '\'' +
                ", prefix='" + prefix + '\'' +
                ", namespaces=" + namespaces;
    }

}

Frequently Asked Questions

What is the XmlElement class?
XmlElement is a class in the netty codebase, defined in codec-xml/src/main/java/io/netty/handler/codec/xml/XmlElement.java.
Where is XmlElement defined?
XmlElement is defined in codec-xml/src/main/java/io/netty/handler/codec/xml/XmlElement.java at line 25.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free