Package net.sourceforge.javautil.ui.command.annotation

Examples of net.sourceforge.javautil.ui.command.annotation.Flag.defaultValue()


          if (fla != null) {
            if (type != boolean.class && type != Boolean.class)
              throw new IllegalArgumentException("Invalid flag definition, can only be used on boolean types");
           
            defs.add(fla.name());
            this.addFlag(fla.name(), fla.value(), fla.defaultValue());
          }
        } else {
          Option opt = options[offset];
          defs.add(opt.name());
          this.addOption(opt.name(), type, opt.desc(), opt.defaultDesc());
View Full Code Here


   
    properties = descriptor.getProperties(Flag.class);
    for (ClassProperty property : properties) {
      Flag flag = property.getAnnotation(Flag.class);
      String name = "".equals(flag) ? property.getName() : flag.name();
      this.addFlag(name, flag.value(), flag.defaultValue());
    }
   
  }
 
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.