org.pf.textx
Interface VariableResolver

All Known Subinterfaces:
VariableContainer
All Known Implementing Classes:
BasicVariableContainer, GlobalLocalPlaceholderReplacement, GlobalLocalVariables, VariableResolverPool

public interface VariableResolver

This interface defines the method an object must support, if it wants to provide values associated to specific variable names.

Version:
1.1
Author:
Manfred Duchrow

Method Summary
 java.lang.Object getValue(java.lang.String varName)
          Returns the value for the variable with the given name.
 boolean isKnownVariable(java.lang.String varName)
          Returns if the variable with the given name can be resolved by the receiver.
 java.util.Set knownVariableNames()
          Returns all variable name the resolver currently knows
 

Method Detail

getValue

java.lang.Object getValue(java.lang.String varName)
                          throws UnknownVariableException
Returns the value for the variable with the given name.

Parameters:
varName - The case sensitive name of the variable.
Returns:
The value associated to the given variable (even null is a valid value)
Throws:
UnknownVariableException - The receiver is not knowing the variable.

isKnownVariable

boolean isKnownVariable(java.lang.String varName)
Returns if the variable with the given name can be resolved by the receiver.

Parameters:
varName - The case sensitive name of the variable.
Returns:
Whether the variable with the given name is known or not.

knownVariableNames

java.util.Set knownVariableNames()
Returns all variable name the resolver currently knows