code: @SuppressWarnings("unchecked")
      protected OptionHandler createOptionHandler(CmdLineParser parser, OptionDef o, Setter setter) {
          checkNonNull(o, "CmdLineParser");
          checkNonNull(o, "OptionDef");
          checkNonNull(setter, "Setter");
  
          Class<? extends OptionHandler> h = o.handler();
          if(h==OptionHandler.class) {
              // infer the type
              Class<?> t = setter.getType();
  
              // enum is the special case
              if(Enum.class.isAssignableFrom(t))
                  return new EnumOptionHandler(parser,o,setter,t);
  
              OptionHandlerFactory factory = handlers.get(t);
              if (factory==null)
                  throw new IllegalAnnotationError(Messages.UNKNOWN_HANDLER.format(t));
  
              return factory.getHandler(parser, o, setter);
          } else {
              // explicit handler specified
              return new DefaultConstructorHandlerFactory(h).getHandler(parser, o, setter);
          }
      }
docs: Creates an {@link OptionHandler} that handles the given {@link Option} annotation
  and the {@link Setter} instance.