|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weblogic.apache.xalan.xpath.xml.StringVector | +--weblogic.apache.xalan.xpath.xml.MutableAttrListImpl
Implement the SAX AttributeList interface, using a single array.
This class is based on an implementation from the Apache XML Project. In future releases the XML parser, XSLT processor, and associated classes will likely be updated to be based on a later version of the Apache implementations. Since Apache does not guarantee backwards compatibility between versions of their software, we cannot guarantee backwards compatibility of any of the classes contained in the weblogic.apache package or sub-packages.
Fields inherited from class weblogic.apache.xalan.xpath.xml.StringVector |
m_blocksize,
m_firstFree,
m_map,
m_mapSize |
Constructor Summary | |
MutableAttrListImpl()
Create an empty attribute list. |
|
MutableAttrListImpl(org.xml.sax.AttributeList atts)
Construct a persistent copy of an existing attribute list. |
Method Summary | |
void |
addAttribute(java.lang.String name,
java.lang.String type,
java.lang.String value)
Add an attribute to an attribute list. |
void |
clear()
Clear the attribute list. |
int |
getLength()
Return the number of attributes in the list. |
java.lang.String |
getName(int i)
Get the name of an attribute (by position). |
java.lang.String |
getType(int i)
Get the type of an attribute (by position). |
java.lang.String |
getType(java.lang.String name)
Get the type of an attribute (by name). |
java.lang.String |
getValue(int i)
Get the value of an attribute (by position). |
java.lang.String |
getValue(java.lang.String name)
Get the value of an attribute (by name). |
void |
removeAttribute(java.lang.String name)
Remove an attribute from the list. |
void |
setAttributeList(org.xml.sax.AttributeList atts)
Set the attribute list, discarding previous contents. |
Methods inherited from class weblogic.apache.xalan.xpath.xml.StringVector |
addElement,
contains,
containsIgnoreCase,
elementAt,
peek,
pop,
push,
size |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public MutableAttrListImpl()
This constructor is most useful for parser writers, who will use it to create a single, reusable attribute list that can be reset with the clear method between elements.
addAttribute(java.lang.String, java.lang.String, java.lang.String)
,
clear()
public MutableAttrListImpl(org.xml.sax.AttributeList atts)
This constructor is most useful for application writers, who will use it to create a persistent copy of an existing attribute list.
atts
- The attribute list to copyDocumentHandler.startElement(java.lang.String, org.xml.sax.AttributeList)
Method Detail |
public void setAttributeList(org.xml.sax.AttributeList atts)
This method allows an application writer to reuse an attribute list easily.
atts
- The attribute list to copy.public void addAttribute(java.lang.String name, java.lang.String type, java.lang.String value)
This method is provided for SAX parser writers, to allow them to build up an attribute list incrementally before delivering it to the application.
name
- The attribute name.type
- The attribute type ("NMTOKEN" for an enumeration).value
- The attribute value (must not be null).removeAttribute(java.lang.String)
,
DocumentHandler.startElement(java.lang.String, org.xml.sax.AttributeList)
public void removeAttribute(java.lang.String name)
SAX application writers can use this method to filter an attribute out of an AttributeList. Note that invoking this method will change the length of the attribute list and some of the attribute's indices.
If the requested attribute is not in the list, this is a no-op.
name
- The attribute name.addAttribute(java.lang.String, java.lang.String, java.lang.String)
public void clear()
SAX parser writers can use this method to reset the attribute list between DocumentHandler.startElement events. Normally, it will make sense to reuse the same MutableAttrListImpl object rather than allocating a new one each time.
DocumentHandler.startElement(java.lang.String, org.xml.sax.AttributeList)
public int getLength()
AttributeList.getLength()
public java.lang.String getName(int i)
i
- The position of the attribute in the list.AttributeList.getName(int)
public java.lang.String getType(int i)
i
- The position of the attribute in the list.AttributeList.getType(int)
public java.lang.String getValue(int i)
i
- The position of the attribute in the list.AttributeList.getValue(int)
public java.lang.String getType(java.lang.String name)
name
- The attribute name.AttributeList.getType(java.lang.String)
public java.lang.String getValue(java.lang.String name)
name
- The attribute name.AttributeList.getValue(java.lang.String)
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs60 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |