net.sourceforge.saxadapter.examples.env
Class AntPropertyResolver

java.lang.Object
  |
  +--org.xml.sax.helpers.XMLFilterImpl
        |
        +--net.sourceforge.saxadapter.PipelineBase
              |
              +--net.sourceforge.saxadapter.examples.env.AntPropertyResolver
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.ext.DeclHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler, org.xml.sax.ext.LexicalHandler, org.xml.sax.XMLFilter, org.xml.sax.XMLReader

public class AntPropertyResolver
extends PipelineBase

This is a SAX pipeline component that takes character data that contains Ant format properties and resolves the properties according to the supplied Environment

Author:
Mark Priest

Fields inherited from class net.sourceforge.saxadapter.PipelineBase
m_locator, m_nsSupport
 
Constructor Summary
AntPropertyResolver(Environment argEnv)
           
 
Method Summary
 void characters(char[] ch, int start, int length)
          Resolves Ant format properties based on the contents of the Environment (i.e.
static void main(java.lang.String[] args)
           
 
Methods inherited from class net.sourceforge.saxadapter.PipelineBase
attributeDecl, comment, elementDecl, endCDATA, endDocument, endDTD, endElement, endEntity, endPrefixMapping, externalEntityDecl, getContentHandler, getProperty, ignorableWhitespace, internalEntityDecl, onCharacters, onEndDocument, onEndElement, onEndPrefixMapping, onIgnorableWhitespace, onProcessingInstruction, onSetDocumentLocator, onSkippedEntity, onStartDocument, onStartElement, onStartPrefixMapping, parse, parse, processingInstruction, reset, setContentHandler, setDocumentLocator, setProperty, skippedEntity, startCDATA, startDocument, startDTD, startElement, startEntity, startPrefixMapping
 
Methods inherited from class org.xml.sax.helpers.XMLFilterImpl
error, fatalError, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, notationDecl, resolveEntity, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AntPropertyResolver

public AntPropertyResolver(Environment argEnv)
Method Detail

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws org.xml.sax.SAXException
Resolves Ant format properties based on the contents of the Environment (i.e. ${propname} resolves to Environment.getObjectProperty("propname").toString()) no nesting is permitted (i.e. ${${propname}} will be evaluated as "${" + Environment.getObjectProperty("propname").toString() + "}"
Overrides:
characters in class PipelineBase
Parameters:
ch - character array from SAX callback
start - beginning of char array
length - length of char array
Throws:
org.xml.sax.SAXException -  

main

public static void main(java.lang.String[] args)