org.apache.hivemind.impl
Class SymbolExpander

java.lang.Object
  extended by org.apache.hivemind.impl.SymbolExpander

public class SymbolExpander
extends java.lang.Object

A simple parser used to identify symbols in a string and expand them via a SymbolSource.

Author:
Howard Lewis Ship

Constructor Summary
SymbolExpander(ErrorHandler handler, SymbolSource source)
           
 
Method Summary
 java.lang.String expandSymbols(java.lang.String text, Location location)
           Identifies symbols in the text and expands them, using the SymbolSource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SymbolExpander

public SymbolExpander(ErrorHandler handler,
                      SymbolSource source)
Method Detail

expandSymbols

public java.lang.String expandSymbols(java.lang.String text,
                                      Location location)

Identifies symbols in the text and expands them, using the SymbolSource. Returns the modified text. May return text if text does not contain any symbols.

Parameters:
text - the text to scan
location - the location to report errors (undefined symbols)