Class Attribute

java.lang.Object
com.ctc.wstx.sr.Attribute

final class Attribute extends Object
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 Details

    • mLocalName

      protected String mLocalName
    • mPrefix

      protected String mPrefix
    • mNamespaceURI

      protected String mNamespaceURI
    • mValueStartOffset

      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
    • mReusableValue

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

    • Attribute

      public Attribute(String prefix, String localName, int valueStart)
  • Method Details

    • reset

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

      public void setValue(String value)
      Method called to inject specific value for this attribute.
    • hasQName

      protected boolean hasQName(String uri, String localName)
      Parameters:
      uri - Namespace URI of the attribute, if any; MUST be given as null if no namespace
      localName - Local name to match. Note: is NOT guaranteed to have been interned
      Returns:
      True if qualified name of this attribute is the same as what arguments describe
    • hasLocalName

      public boolean hasLocalName(String localName)
      Since:
      5.2
    • getQName

      public QName getQName()
    • getValue

      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
    • getValue

      public String getValue(String allValues, int endOffset)