Class StringLookupAdapter

java.lang.Object
org.apache.commons.configuration2.interpol.StringLookupAdapter
All Implemented Interfaces:
Lookup

final class StringLookupAdapter extends Object implements Lookup
Wraps an Apache Commons Text StringLookup as an Apache Commons Configuration Lookup.
Since:
2.4
  • Field Details

    • stringLookup

      private final org.apache.commons.text.lookup.StringLookup stringLookup
      The StringLookup delegate.
  • Constructor Details

    • StringLookupAdapter

      StringLookupAdapter(org.apache.commons.text.lookup.StringLookup stringLookup)
  • Method Details

    • lookup

      public Object lookup(String key)
      Description copied from interface: Lookup
      Looks up the value of the specified variable. This method is called by ConfigurationInterpolator with the variable name extracted from the expression to interpolate (i.e. the prefix name has already been removed). A concrete implementation has to return the value of this variable or null if the variable name is unknown.
      Specified by:
      lookup in interface Lookup
      Parameters:
      key - the name of the variable to be resolved
      Returns:
      the value of this variable or null