Package org.kohsuke.args4j.spi

Examples of org.kohsuke.args4j.spi.OptionImpl


  public void parse(CmdLineParser parser, Object bean) throws ClassNotFoundException {
        for(Class c=bean.getClass(); c!=null; c=c.getSuperclass()) {
          System.out.println("Class: " + c);
          for( Field f : c.getDeclaredFields() ) {
            Option o = new OptionImpl(createConfigElement(f));
        parser.addOption(Setters.create(f, bean), o );
          }
        }
  }
View Full Code Here


  public void parse(InputSource xml, CmdLineParser parser, Object bean) {
    try {
      Config config = Config.parse(xml);
      for(ConfigElement ce : config.options) {
        Option option = new OptionImpl(ce);
                parser.addOption(Setters.create(parser, findMethodOrField(bean, ce.field, ce.method),bean), option);
      }
      for (ConfigElement ce : config.arguments) {
        Argument argument = new ArgumentImpl(ce);
        parser.addArgument(Setters.create(parser, findMethodOrField(bean, ce.field, ce.method),bean), argument);
View Full Code Here

  public void parse(InputSource xml, CmdLineParser parser, Object bean) {
    try {
      Config config = Config.parse(xml);
      for(ConfigElement ce : config.options) {
        Option option = new OptionImpl(ce);
                parser.addOption(Setters.create(parser, findMethodOrField(bean, ce.field, ce.method),bean), option);
      }
      for (ConfigElement ce : config.arguments) {
        Argument argument = new ArgumentImpl(ce);
        parser.addArgument(Setters.create(parser, findMethodOrField(bean, ce.field, ce.method),bean), argument);
View Full Code Here

TOP

Related Classes of org.kohsuke.args4j.spi.OptionImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.