getRegistry() call.
| Modifier and Type | Class and Description |
|---|---|
| private class | |
| public static interface | OptionHandlerRegistry.
Provide custom logic for creating |
| Modifier and Type | Field and Description |
|---|---|
| private final Map | handlers
All |
| private static OptionHandlerRegistry | instance
The shared reference. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| protected OptionHandler | createOptionHandler(CmdLineParser parser, OptionDef o, Setter<T> setter)
Creates an |
| private static Constructor | getConstructor(Class<? extends OptionHandler<T>> handlerClass)
Finds the constructor for an option handler. |
| public static synchronized OptionHandlerRegistry | Returns: a shared instance of the registry.Gets the option handler registry singleton instance. |
| private void | |
| public void | registerHandler(Class<T>
The specified handler is used when the field/method annotated by valueType, Class<? extends OptionHandler<T>> Option
is of this type.This class must have the constructor that has the same signature as
handlerClass)OptionHandler#OptionHandler(CmdLineParser, OptionDef, Setter)Registers a user-defined |
| public void | registerHandler(Class<T>
The specified handler is used when the field/method annotated by valueType, OptionHandlerRegistry.Option
is of this type.Factory to instantiate handler upon request. factoryRegisters a user-defined |
| handlers | back to summary |
|---|---|
| private final Map<Class<T>, OptionHandlerRegistry. All | |
| instance | back to summary |
|---|---|
| private static OptionHandlerRegistry instance The shared reference.
| |
| OptionHandlerRegistry | back to summary |
|---|---|
| private OptionHandlerRegistry() Constructs an option handler manager with the default handlers initialized. | |
| createOptionHandler | back to summary |
|---|---|
| protected OptionHandler Creates an
| |
| getConstructor | back to summary |
|---|---|
| private static Constructor Finds the constructor for an option handler. | |
| getRegistry | back to summary |
|---|---|
| public static synchronized OptionHandlerRegistry getRegistry() Gets the option handler registry singleton instance.
| |
| initHandlers | back to summary |
|---|---|
| private void initHandlers() Registers the default handlers. | |
| registerHandler | back to summary |
|---|---|
| public void registerHandler(Class<T> valueType, Class<? extends OptionHandler<T>> handlerClass) Registers a user-defined
This method allows users to extend the behavior of args4j by writing
their own
| |
| registerHandler | back to summary |
|---|---|
| public void registerHandler(Class<T> valueType, OptionHandlerRegistry. Registers a user-defined
This method allows users to extend the behavior of args4j by writing
their own
| |
| Modifier and Type | Field and Description |
|---|---|
| private final Constructor |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public OptionHandler | getHandler(CmdLineParser parser, OptionDef o, Setter<T> setter)
Implements org. Provide a handler instance to use. |
| cons | back to summary |
|---|---|
| private final Constructor<? extends OptionHandler<T>> cons | |
| DefaultConstructorHandlerFactory | back to summary |
|---|---|
| public DefaultConstructorHandlerFactory(Class<T> type) | |
| getHandler | back to summary |
|---|---|
| public OptionHandler Implements org. Doc from org. Provide a handler instance to use. | |
OptionHandler implementation.
| Modifier and Type | Method and Description |
|---|---|
| public OptionHandler |
| getHandler | back to summary |
|---|---|
| public OptionHandler Provide a handler instance to use. | |