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

public abstract Class TagName

extends Object
Class Inheritance
Known Direct Subclasses
org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.SAXConnector.TagNameImpl, org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.StAXConnector.TagNameImpl
Annotations
@SuppressWarnings:StringEquality
Imports
org.glassfish.jaxb.runtime.v2.runtime.Name, org.xml.sax.Attributes, javax.xml.namespace.QName

Represents an XML tag name (and attributes for start tags.)

This object is used so reduce the number of method call parameters among unmarshallers. An instance of this is expected to be reused by the caller of XmlVisitor. Note that the rest of the unmarshaller may modify any of the fields while processing an event (such as to intern strings, replace attributes), so XmlVisitor should reset all fields for each use.

The 'qname' parameter, which holds the qualified name of the tag (such as 'foo:bar' or 'zot'), is not used in the typical unmarshalling route and it's also expensive to compute for some input. Thus this parameter is computed lazily.

Author
Kohsuke Kawaguchi

Field Summary

Modifier and TypeField and Description
public Attributes
atts

Used only for the enterElement event.

public String
local

Local part of the attribute/element name.

public String
uri

URI of the attribute/element name.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public QName
createQName()

Creates QName.

public String

Returns:

can be "" but never null.
getPrefix
()

Gets the prefix.

public abstract String

Returns:

never null.
getQname
()

Gets the qualified name of the tag.

public final boolean
matches(String nsUri, String local)

Checks if the given name pair matches this name.

public final boolean
matches(Name name)

Checks if the given name pair matches this name.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

attsback to summary
public Attributes atts

Used only for the enterElement event. Otherwise the value is undefined. This might be AttributesEx.

localback to summary
public String local

Local part of the attribute/element name. Never be null. Interned.

uriback to summary
public String uri

URI of the attribute/element name. Can be empty, but never null. Interned.

Constructor Detail

TagNameback to summary
public TagName()

Method Detail

createQNameback to summary
public QName createQName()

Creates QName.

getPrefixback to summary
public String getPrefix()

Gets the prefix. This is slow.

Returns:String

can be "" but never null.

getQnameback to summary
public abstract String getQname()

Gets the qualified name of the tag.

Returns:String

never null.

matchesback to summary
public final boolean matches(String nsUri, String local)

Checks if the given name pair matches this name.

matchesback to summary
public final boolean matches(Name name)

Checks if the given name pair matches this name.

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