|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface OptionValueProvider
Core interface that "value providers" should implement. Value providers attempt to satisfy command line options through other means (e.g., annotation against Class, resource in classpath, Spring properties, etc.). Required options that are populated via option value providers turn "optional" and don't need to be populated via command line arguments. If an option's value is provided for such an option via command line arguments, optionValueProvider provided value is overridden. Example: A classpath resource based option value provider may load a well-known resources file and then look for keys that are named using the option's longOption value. It can then use such values to populate the options with "default" values.
| Method Summary | |
|---|---|
void |
provideOptionValues(Class<? extends Environment> clz,
Environment environment,
List<? extends OptionPropertyAccessor> list,
Class<? extends Launchable> launchableClass,
Launchable launchable)
Called for each environment being used. |
void |
provideOptionValues(Class<? extends Launchable> launchableClass,
Launchable launchable,
List<? extends OptionPropertyAccessor> launchProperties)
Callback to setup the target (launchable instance) with "default" options using this option provider. |
| Method Detail |
|---|
void provideOptionValues(Class<? extends Environment> clz,
Environment environment,
List<? extends OptionPropertyAccessor> list,
Class<? extends Launchable> launchableClass,
Launchable launchable)
clz - Class of the environment (often different from environment.getClass()).environment - Environment instance.list - List of properties relevant to the environment.launchableClass - "Main"'s class.launchable - Main instance.
void provideOptionValues(Class<? extends Launchable> launchableClass,
Launchable launchable,
List<? extends OptionPropertyAccessor> launchProperties)
launchableClass - Class of the "main" class (often different from launchable.getClass())launchable - Main instance.launchProperties - Option properties defined in the "main" launchable that may need to
be populated by the OptionValueProvider.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||