A specialized lookup implementation that allows access to constant fields of
classes.
Sometimes it is necessary in a configuration file to refer to a constant
defined in a class. This can be done with this lookup implementation.
Variable names passed in must be of the form
mypackage.MyClass.FIELD . The lookup() method
will split the passed in string at the last dot, separating the fully
qualified class name and the name of the constant (i.e. static final)
member field. Then the class is loaded and the field's value is obtained
using reflection.
Once retrieved values are cached for fast access. This class is thread-safe.
It can be used as a standard (i.e. global) lookup object and serve multiple
clients concurrently.
version: $Id: ConstantLookup.java 490375 2006-12-26 21:28:04Z oheger $ since: 1.4 author: author: href="http://jakarta.apache.org/commons/configuration/team-list.html">Commons author: Configuration team |