org.pf.textx
Class GlobalLocalPlaceholderReplacement

java.lang.Object
  extended by org.pf.textx.GlobalLocalVariables
      extended by org.pf.textx.GlobalLocalPlaceholderReplacement
All Implemented Interfaces:
VariableContainer, VariableResolver

public class GlobalLocalPlaceholderReplacement
extends GlobalLocalVariables

Contains all variable settings and provides a mechanism, to replace variable names in a text by their current value.

Version:
1.0
Author:
Manfred Duchrow

Constructor Summary
GlobalLocalPlaceholderReplacement()
          Initialize the new instance with default values.
 
Method Summary
 FunctionResolver getFunctionResolver()
          Returns the function resolver
 TextEngine getTextEngine()
          Returns the underlying text engine which might be useful to do further configuration settings.
 java.lang.String replace(java.lang.String text)
          Replaces all known variables in the given text and returns the new string.
 void setFunctionResolver(FunctionResolver functionResolver)
          Sets the function resolver
 
Methods inherited from class org.pf.textx.GlobalLocalVariables
getValue, isKnownVariable, knownVariableNames, newGlobalContext, newLocalContext, removeVariable, set, setGlobal, setGlobalFrom, setGlobalObject, setLocal, setLocalFrom, setLocalObject, setValue, setValueFor
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlobalLocalPlaceholderReplacement

public GlobalLocalPlaceholderReplacement()
Initialize the new instance with default values.

Method Detail

replace

public java.lang.String replace(java.lang.String text)
                         throws TextReplacementException
Replaces all known variables in the given text and returns the new string.

Throws:
TextReplacementException

getTextEngine

public TextEngine getTextEngine()
Returns the underlying text engine which might be useful to do further configuration settings.


getFunctionResolver

public FunctionResolver getFunctionResolver()
Returns the function resolver


setFunctionResolver

public void setFunctionResolver(FunctionResolver functionResolver)
Sets the function resolver