Top Description Fields Constructors Methods
com.ctc.wstx.sr

pack-priv final Class Attribute

extends Object
Class Inheritance
Imports
javax.xml.namespace.QName, com.ctc.wstx.compat.QNameCreator

Container for information collected regarding a single element attribute instance. Used for both regular explicit attributes and values added via attribute value defaulting.

This class is not exposed outside of the package and is considered part of internal implementation.

Since
4.1

Field Summary

Modifier and TypeField and Description
protected String
protected String
protected String
protected String
mReusableValue

Value as a String iff it has been requested once; stored here in case it will be accessed again.

protected int
mValueStartOffset

Numeric offset within text builder that denotes pointer to the first character of the value for this attribute (or namespace).

Constructor Summary

AccessConstructor and Description
public
Attribute(String prefix, String localName, int valueStart)

Method Summary

Modifier and TypeMethod and Description
public QName
public String
getValue(String allValues)

Method called if this attribute is the last one with value in the buffer.

public String
getValue(String allValues, int endOffset)

public boolean
hasLocalName(String localName)

protected boolean

Returns:

True if qualified name of this attribute is the same as what arguments describe
hasQName
(String
Namespace URI of the attribute, if any; MUST be given as null if no namespace
uri
,
String
Local name to match.

Note

is NOT guaranteed to have been interned

localName
)

public void
reset(String prefix, String localName, int valueStart)

public void
setValue(String value)

Method called to inject specific value for this attribute.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

mLocalNameback to summary
protected String mLocalName
mNamespaceURIback to summary
protected String mNamespaceURI
mPrefixback to summary
protected String mPrefix
mReusableValueback to summary
protected String mReusableValue

Value as a String iff it has been requested once; stored here in case it will be accessed again.

mValueStartOffsetback to summary
protected int mValueStartOffset

Numeric offset within text builder that denotes pointer to the first character of the value for this attribute (or namespace). End offset is derived by looking at start pointer of the following attribute; or total length for the last entry

Constructor Detail

Attributeback to summary
public Attribute(String prefix, String localName, int valueStart)

Method Detail

getQNameback to summary
public QName getQName()
getValueback to summary
public String getValue(String allValues)

Method called if this attribute is the last one with value in the buffer. If so, end value is implied

getValueback to summary
public String getValue(String allValues, int endOffset)
hasLocalNameback to summary
public boolean hasLocalName(String localName)
Since
5.2
hasQNameback to summary
protected boolean hasQName(String uri, String localName)
Parameters
uri:String

Namespace URI of the attribute, if any; MUST be given as null if no namespace

localName:String

Local name to match.

Note

is NOT guaranteed to have been interned

Returns:boolean

True if qualified name of this attribute is the same as what arguments describe

resetback to summary
public void reset(String prefix, String localName, int valueStart)
setValueback to summary
public void setValue(String value)

Method called to inject specific value for this attribute.