Class VariableAttributes
- java.lang.Object
-
- org.apache.commons.digester.substitution.VariableAttributes
-
- All Implemented Interfaces:
org.xml.sax.Attributes
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.
- Since:
- 1.6
-
-
Field Summary
Fields Modifier and Type Field Description private org.xml.sax.Attributes
attrs
private VariableExpander
expander
private java.util.ArrayList
values
-
Constructor Summary
Constructors Constructor Description VariableAttributes()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Field Detail
-
values
private java.util.ArrayList values
-
attrs
private org.xml.sax.Attributes attrs
-
expander
private VariableExpander expander
-
-
Method Detail
-
init
public void init(org.xml.sax.Attributes attrs, VariableExpander expander)
Specify which attributes class this object is a proxy for.
-
getValue
public java.lang.String getValue(int index)
- Specified by:
getValue
in interfaceorg.xml.sax.Attributes
-
getValue
public java.lang.String getValue(java.lang.String qname)
- Specified by:
getValue
in interfaceorg.xml.sax.Attributes
-
getValue
public java.lang.String getValue(java.lang.String uri, java.lang.String localname)
- Specified by:
getValue
in interfaceorg.xml.sax.Attributes
-
getIndex
public int getIndex(java.lang.String qname)
- Specified by:
getIndex
in interfaceorg.xml.sax.Attributes
-
getIndex
public int getIndex(java.lang.String uri, java.lang.String localpart)
- Specified by:
getIndex
in interfaceorg.xml.sax.Attributes
-
getLength
public int getLength()
- Specified by:
getLength
in interfaceorg.xml.sax.Attributes
-
getLocalName
public java.lang.String getLocalName(int index)
- Specified by:
getLocalName
in interfaceorg.xml.sax.Attributes
-
getQName
public java.lang.String getQName(int index)
- Specified by:
getQName
in interfaceorg.xml.sax.Attributes
-
getType
public java.lang.String getType(int index)
- Specified by:
getType
in interfaceorg.xml.sax.Attributes
-
getType
public java.lang.String getType(java.lang.String qname)
- Specified by:
getType
in interfaceorg.xml.sax.Attributes
-
getType
public java.lang.String getType(java.lang.String uri, java.lang.String localname)
- Specified by:
getType
in interfaceorg.xml.sax.Attributes
-
getURI
public java.lang.String getURI(int index)
- Specified by:
getURI
in interfaceorg.xml.sax.Attributes
-
-