anchor.diff:      public void run() {
           assert list instanceof java.util.LinkedList;
       }
  +}
  +----
  +
  +.Kotlin
  +[source,kotlin,role="secondary"]
  +----
  +import picocli.CommandLine
  +import picocli.CommandLine.Command
  +import javax.inject.Inject
  +
  +@Command(name = "di-demo")
  +class InjectionDemo : Runnable {
  +    @Inject lateinit var list: kotlin.collections.List<Any>
  +
  +    @CommandLine.Option(names = ["-x"]) var x = 0
  +
  +    override fun run() {
  +        assert(list is kotlin.collections.ArrayList<*>)
  +    }
  +}
  +
  +fun main(args: Array<String>) {
  +    CommandLine(InjectionDemo::class.java, GuiceFactory()).execute(*args)
   }
   ----
   
  
positive.code: }
  ----
  
  Use the custom factory when creating a `CommandLine` instance, or when invoking the `run` or `call` convenience methods:
  
  [source,java]
  ----
  import javax.inject.*;
  import picocli.*;
  import picocli.CommandLine.*;
  
  @Command(name = "di-demo")
  
negative.code: 
  The below example shows how to create a <<Custom Factory,custom `IFactory`>> implementation with a Guice `Injector`:
  
  .Java
  [source,java,role="primary"]
  ----
  import com.google.inject.*;
  import picocli.CommandLine;
  