public class ConfigGetter extends ConfigAccessorMethod
ConfigMethod.Factory
Modifier and Type | Field and Description |
---|---|
static ConfigMethod.Factory |
FACTORY
The ConfigGetter factory.
|
Constructor and Description |
---|
ConfigGetter(java.lang.Class<?> configInterface,
java.lang.reflect.Method method)
Create a new ConfigGetter instance.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getProperty(ConfigPersister configuration)
Get a configuration field value.
|
java.lang.String |
getProperty(ConfigPersister persister,
java.lang.String defaultValue)
Get a configuration field value with a run-time default.
|
java.lang.Object |
invoke(ConfigHandler handler,
java.lang.Object[] args,
java.lang.Object proxy)
Handle a configuration interface method invocation.
|
getPropertyName
public static final ConfigMethod.Factory FACTORY
public ConfigGetter(java.lang.Class<?> configInterface, java.lang.reflect.Method method)
configInterface
- The configuration interface.method
- The method.public java.lang.Object invoke(ConfigHandler handler, java.lang.Object[] args, java.lang.Object proxy)
getProperty(ConfigPersister)
or
getProperty(ConfigPersister, String)
depending on whether a
run-time default value was specified.invoke
in class ConfigMethod
handler
- The handler.args
- The method arguments.proxy
- The dynamic proxy created for the configuration interface.public java.lang.String getProperty(ConfigPersister configuration)
configuration
- The configuration source.public java.lang.String getProperty(ConfigPersister persister, java.lang.String defaultValue)
persister
- The configuration source.defaultValue
- The default value to use if a value is
not specified by the configuration source.