All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.kohsuke.rngom.nc.SimpleNameClass Maven / Gradle / Ivy

Go to download

Old JAXB Binding Compiler. Contains source code needed for binding customization files into java sources. In other words: the *tool* to generate java classes for the given xml representation.

There is a newer version: 4.0.5
Show newest version
package org.kohsuke.rngom.nc;

import javax.xml.namespace.QName;

public class SimpleNameClass extends NameClass {

    public final QName name;

    public SimpleNameClass(QName name) {
        this.name = name;
    }
    
    public SimpleNameClass( String nsUri, String localPart ) {
        this( new QName(nsUri,localPart) );
    }

    public boolean contains(QName name) {
        return this.name.equals(name);
    }

    public int containsSpecificity(QName name) {
        return contains(name) ? SPECIFICITY_NAME : SPECIFICITY_NONE;
    }

    public int hashCode() {
        return name.hashCode();
    }

    public boolean equals(Object obj) {
        if (obj == null || !(obj instanceof SimpleNameClass))
            return false;
        SimpleNameClass other = (SimpleNameClass) obj;
        return name.equals(other.name);
    }

    public  V accept(NameClassVisitor visitor) {
        return visitor.visitName(name);
    }

    public boolean isOpen() {
        return false;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy