Top Description Fields Constructors Methods
org.glassfish.jaxb.runtime.v2.runtime

public final Class Name

extends Object
implements Comparable<Name>
Class Inheritance
All Implemented Interfaces
java.lang.Comparable
Imports
javax.xml.namespace.QName

The internal representation of an XML name.

This class keeps indicies for URI and local name for enabling faster processing.

Names are ordered lexicographically (nsUri first, local name next.) This is the same order required by canonical XML.

Author
Kohsuke Kawaguchi

Field Summary

Modifier and TypeField and Description
public final boolean
isAttribute

Specifies if the Name is associated with an EII or AII

public final String
localName

Local name.

public final short
public final String
nsUri

Namespace URI.

public final short
nsUriIndex

Index -1 is reserved for representing the empty namespace URI of attributes.

public final short
qNameIndex

Index of the Name for an EII or AII

Constructor Summary

AccessConstructor and Description
pack-priv
Name(int qNameIndex, int nsUriIndex, String nsUri, int localIndex, String localName, boolean isAttribute)

Method Summary

Modifier and TypeMethod and Description
public int
compareTo(Name that)

Implements java.lang.Comparable.compareTo.

Compares this object with the specified object for order.

public boolean
equals(String nsUri, String localName)

public QName
toQName()

Creates a QName from this.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

isAttributeback to summary
public final boolean isAttribute

Specifies if the Name is associated with an EII or AII

localNameback to summary
public final String localName

Local name. interned.

localNameIndexback to summary
public final short localNameIndex
nsUriback to summary
public final String nsUri

Namespace URI. interned.

nsUriIndexback to summary
public final short nsUriIndex

Index -1 is reserved for representing the empty namespace URI of attributes.

qNameIndexback to summary
public final short qNameIndex

Index of the Name for an EII or AII

Constructor Detail

Nameback to summary
pack-priv Name(int qNameIndex, int nsUriIndex, String nsUri, int localIndex, String localName, boolean isAttribute)

Method Detail

compareToback to summary
public int compareTo(Name that)

Implements java.lang.Comparable.compareTo.

Doc from java.lang.Comparable.compareTo.

Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

The implementor must ensure signum(x.compareTo(y)) == -signum(y.compareTo(x)) for all x and y. (This implies that x.compareTo(y) must throw an exception if and only if y.compareTo(x) throws an exception.)

The implementor must also ensure that the relation is transitive: (x.compareTo(y) > 0 && y.compareTo(z) > 0) implies x.compareTo(z) > 0.

Finally, the implementor must ensure that x.compareTo(y)==0 implies that signum(x.compareTo(z)) == signum(y.compareTo(z)), for all z.

Annotations
@Override
equalsback to summary
public boolean equals(String nsUri, String localName)
toQNameback to summary
public QName toQName()

Creates a QName from this.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override