org.apache.commons.digester.substitution

Class VariableAttributes

Implemented Interfaces:
Attributes

public class VariableAttributes
extends java.lang.Object
implements 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

private Attributes
attrs
private VariableExpander
expander
private ArrayList
values

Method Summary

int
getIndex(String qname)
int
getIndex(String uri, String localpart)
int
getLength()
String
getLocalName(int index)
String
getQName(int index)
String
getType(String qname)
String
getType(String uri, String localname)
String
getType(int index)
String
getURI(int index)
String
getValue(String qname)
String
getValue(String uri, String localname)
String
getValue(int index)
void
init(Attributes attrs, VariableExpander expander)
Specify which attributes class this object is a proxy for.

Field Details

attrs

private Attributes attrs


expander

private VariableExpander expander


values

private ArrayList values

Method Details

getIndex

public int getIndex(String qname)


getIndex

public int getIndex(String uri,
                    String localpart)


getLength

public int getLength()


getLocalName

public String getLocalName(int index)


getQName

public String getQName(int index)


getType

public String getType(String qname)


getType

public String getType(String uri,
                      String localname)


getType

public String getType(int index)


getURI

public String getURI(int index)


getValue

public String getValue(String qname)


getValue

public String getValue(String uri,
                       String localname)


getValue

public String getValue(int index)


init

public void init(Attributes attrs,
                 VariableExpander expander)
Specify which attributes class this object is a proxy for.


Copyright 2001-2005 The Apache Software Foundation.