org.apache.commons.digester.substitution
Class VariableAttributes

java.lang.Object
  extended by 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

Constructor Summary
VariableAttributes()
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VariableAttributes

public VariableAttributes()
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 interface org.xml.sax.Attributes

getValue

public java.lang.String getValue(java.lang.String qname)
Specified by:
getValue in interface org.xml.sax.Attributes

getValue

public java.lang.String getValue(java.lang.String uri,
                                 java.lang.String localname)
Specified by:
getValue in interface org.xml.sax.Attributes

getIndex

public int getIndex(java.lang.String qname)
Specified by:
getIndex in interface org.xml.sax.Attributes

getIndex

public int getIndex(java.lang.String uri,
                    java.lang.String localpart)
Specified by:
getIndex in interface org.xml.sax.Attributes

getLength

public int getLength()
Specified by:
getLength in interface org.xml.sax.Attributes

getLocalName

public java.lang.String getLocalName(int index)
Specified by:
getLocalName in interface org.xml.sax.Attributes

getQName

public java.lang.String getQName(int index)
Specified by:
getQName in interface org.xml.sax.Attributes

getType

public java.lang.String getType(int index)
Specified by:
getType in interface org.xml.sax.Attributes

getType

public java.lang.String getType(java.lang.String qname)
Specified by:
getType in interface org.xml.sax.Attributes

getType

public java.lang.String getType(java.lang.String uri,
                                java.lang.String localname)
Specified by:
getType in interface org.xml.sax.Attributes

getURI

public java.lang.String getURI(int index)
Specified by:
getURI in interface org.xml.sax.Attributes


Copyright © 2001-2005 The Apache Software Foundation. All Rights Reserved.