Package picocli
Class CommandLine.DefaultFactory
java.lang.Object
picocli.CommandLine.DefaultFactory
- All Implemented Interfaces:
CommandLine.IFactory
- Enclosing class:
CommandLine
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> T
Returns an instance of the specified class.(package private) static <T> T
create
(CommandLine.IFactory factory, Class<T> cls) createCompletionCandidates
(CommandLine.IFactory factory, Class<? extends Iterable<String>> cls) private static CommandLine.ITypeConverter<?>[]
createConverter
(CommandLine.IFactory factory, Class<? extends CommandLine.ITypeConverter<?>>[] classes) (package private) static CommandLine.IDefaultValueProvider
createDefaultValueProvider
(CommandLine.IFactory factory, Class<? extends CommandLine.IDefaultValueProvider> cls) (package private) static CommandLine.IParameterConsumer
createParameterConsumer
(CommandLine.IFactory factory, Class<? extends CommandLine.IParameterConsumer> cls) (package private) static CommandLine.IVersionProvider
createVersionProvider
(CommandLine.IFactory factory, Class<? extends CommandLine.IVersionProvider> cls) private static Class
<?>
-
Field Details
-
GROOVY_CLOSURE_CLASS
-
-
Constructor Details
-
DefaultFactory
private DefaultFactory()
-
-
Method Details
-
loadClosureClass
-
create
Description copied from interface:CommandLine.IFactory
Returns an instance of the specified class.- Specified by:
create
in interfaceCommandLine.IFactory
- Type Parameters:
T
- the type of the object to return- Parameters:
cls
- the class of the object to return- Returns:
- the instance
- Throws:
Exception
- an exception detailing what went wrong when creating or obtaining the instance
-
createConverter
private static CommandLine.ITypeConverter<?>[] createConverter(CommandLine.IFactory factory, Class<? extends CommandLine.ITypeConverter<?>>[] classes) -
createVersionProvider
static CommandLine.IVersionProvider createVersionProvider(CommandLine.IFactory factory, Class<? extends CommandLine.IVersionProvider> cls) -
createDefaultValueProvider
static CommandLine.IDefaultValueProvider createDefaultValueProvider(CommandLine.IFactory factory, Class<? extends CommandLine.IDefaultValueProvider> cls) -
createCompletionCandidates
-
createParameterConsumer
static CommandLine.IParameterConsumer createParameterConsumer(CommandLine.IFactory factory, Class<? extends CommandLine.IParameterConsumer> cls) -
create
-