public class VariableAttributes
extends java.lang.Object
implements org.xml.sax.Attributes
Wrapper for an org.xml.sax.Attributes object which expands any "variables" referenced in the attribute value via ${foo} or similar. This is only done something actually asks for the attribute value, thereby imposing no performance penalty if the attribute is not used.
Modifier and Type | Field and Description |
---|---|
private org.xml.sax.Attributes |
attrs |
private VariableExpander |
expander |
private java.util.ArrayList |
values |
Constructor and Description |
---|
VariableAttributes() |
Modifier and Type | Method and Description |
---|---|
int |
getIndex(java.lang.String qname) |
int |
getIndex(java.lang.String uri,
java.lang.String localpart) |
int |
getLength() |
java.lang.String |
getLocalName(int index) |
java.lang.String |
getQName(int index) |
java.lang.String |
getType(int index) |
java.lang.String |
getType(java.lang.String qname) |
java.lang.String |
getType(java.lang.String uri,
java.lang.String localname) |
java.lang.String |
getURI(int index) |
java.lang.String |
getValue(int index) |
java.lang.String |
getValue(java.lang.String qname) |
java.lang.String |
getValue(java.lang.String uri,
java.lang.String localname) |
void |
init(org.xml.sax.Attributes attrs,
VariableExpander expander)
Specify which attributes class this object is a proxy for.
|
private java.util.ArrayList values
private org.xml.sax.Attributes attrs
private VariableExpander expander
public void init(org.xml.sax.Attributes attrs, VariableExpander expander)
public java.lang.String getValue(int index)
getValue
in interface org.xml.sax.Attributes
public java.lang.String getValue(java.lang.String qname)
getValue
in interface org.xml.sax.Attributes
public java.lang.String getValue(java.lang.String uri, java.lang.String localname)
getValue
in interface org.xml.sax.Attributes
public int getIndex(java.lang.String qname)
getIndex
in interface org.xml.sax.Attributes
public int getIndex(java.lang.String uri, java.lang.String localpart)
getIndex
in interface org.xml.sax.Attributes
public int getLength()
getLength
in interface org.xml.sax.Attributes
public java.lang.String getLocalName(int index)
getLocalName
in interface org.xml.sax.Attributes
public java.lang.String getQName(int index)
getQName
in interface org.xml.sax.Attributes
public java.lang.String getType(int index)
getType
in interface org.xml.sax.Attributes
public java.lang.String getType(java.lang.String qname)
getType
in interface org.xml.sax.Attributes
public java.lang.String getType(java.lang.String uri, java.lang.String localname)
getType
in interface org.xml.sax.Attributes
public java.lang.String getURI(int index)
getURI
in interface org.xml.sax.Attributes
Copyright 2001-2005 The Apache Software Foundation.