net.sf.eos.util.functions
Class ConfigurationKeyIntrospectorFunction
java.lang.Object
net.sf.eos.util.functions.ConfigurationKeyIntrospectorFunction
- All Implemented Interfaces:
- Function<ConfigurationKeyIntrospectorFunction.ConfigurationKeySupport,ConfigurationKey>
@Experimental
public class ConfigurationKeyIntrospectorFunction
- extends Object
- implements Function<ConfigurationKeyIntrospectorFunction.ConfigurationKeySupport,ConfigurationKey>
Extracts a ConfigurationKey
from a given type with a specified value.
The implementation only intrspects field which are public
, final
and static
. Otherwise the key will be ignored. Use this function with
DefaultValueConfigurationKeyFunction
to get the default value
of a ConfigurationKey
.
- Since:
- 0.1.0
- Version:
- 0.1.0
- Author:
- Sascha Kohlmann
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConfigurationKeyIntrospectorFunction
public ConfigurationKeyIntrospectorFunction()
apply
public ConfigurationKey apply(@Nullable
ConfigurationKeyIntrospectorFunction.ConfigurationKeySupport from)
- Extracts the
ConfigurationKey
from the given class
with the specified value of the key.
- Specified by:
apply
in interface Function<ConfigurationKeyIntrospectorFunction.ConfigurationKeySupport,ConfigurationKey>
- Parameters:
from
- the instance holds the data to refelect the
ConfigurationKey
- Returns:
- a
ConfigurationKey
if the function is able to reflect
it. Otherwise null
.
Copyright © 2008. All Rights Reserved.