package picocli.shell.jline2.example; import java.util.Arrays; import java.util.List; import picocli.CommandLine; import picocli.CommandLine.IFactory; /** *
Can serve for {@link #create(Class)} from a list of given instances or * delegates to a {@link CommandLine#defaultFactory()} if no objects for class * available. *
Usually this would be done with * dependency injection. * @since 4.0.1 * @see https://picocli.info/#_dependency_injection */ public class CustomFactory implements IFactory { private final IFactory factory = CommandLine.defaultFactory(); private final List