Documentation of 'org.clapper.util.text.VariableDereferencer' Java class
VariableDereferencer
org.clapper.util.text

Interface VariableDereferencer

  • All Known Implementing Classes:
    Configuration, MapVariableDereferencer, MultipleMapVariableDereferencer


    public interface VariableDereferencer

    The VariableDereferencer interface defines the behavior of classes that can look up variables by name, returning their values. It is used primarily to mark classes that can work hand-in-hand with VariableSubstituter objects to resolve variable references in strings.

    The values for referenced variables can come from anywhere (in a Properties object, via direct method calls, from a symbol table, etc.), provided the values can be located using only the variable's name.

    See Also:
    MapVariableDereferencer, VariableSubstituter
    • Method Detail

      • getVariableValue

        java.lang.String getVariableValue(java.lang.String varName,
                                          java.lang.Object context)
                                   throws VariableSubstitutionException
        Get the value associated with a given variable.
        Parameters:
        varName - The name of the variable for which the value is desired.
        context - a context object, passed through from the caller to the dereferencer, or null if there isn't one.
        Returns:
        The variable's value. If the variable has no value, this method must return null.
        Throws:
        VariableSubstitutionException - substitution error

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.