Examples of PassedArgument


Examples of net.sourceforge.javautil.ui.command.UICommandArguments.PassedArgument

   
    this.addArgument("file", String.class, "The file that is the groovy script");
  }

  public Object execute(GroovyCLIContext ctx, CommandLineArgumentsStandard arguments) {
    PassedArgument arg = arguments.getArgument(0);
   
    String filename = (String) arg.getValue();
    SystemFile file = new SystemFile(filename);
   
    if (file.isExists()) {
      try {
        Class clazz = compiler.parseClass(file.getInputStream());
View Full Code Here

Examples of net.sourceforge.javautil.ui.command.UICommandArguments.PassedArgument

   */
  public List<PassedArgument> getArguments () {
    List<PassedArgument> arguments = new ArrayList<PassedArgument>();
   
    for (int o=0; o<other.size(); o++) {
      arguments.add(new PassedArgument(o, other.get(o)));
    }
   
    return arguments;
  }
View Full Code Here

Examples of net.sourceforge.javautil.ui.command.UICommandArguments.PassedArgument

  /**
   * @param idx The index of the argument
   * @return The argument, or null if it was not specified
   */
  public PassedArgument getArgument(int idx) {
    return idx >= 0 && idx < other.size() ? new PassedArgument(idx, other.get(idx)) : null;   
  }
View Full Code Here

Examples of net.sourceforge.javautil.ui.command.UICommandArguments.PassedArgument

          Option opt = options[offset];
          PassedOption option = arguments.getOption(def);
          value = option == null ? null : option.getValue();
        }
      } else {
        PassedArgument pa = arguments.getArgument(a);
        if (pa == null) throw new IllegalArgumentException("Missing argument: " + a);
       
        required = true;
        value = pa.getValue();
      }
     
      if (value == null && type.isPrimitive()) newargs[a] = ReflectionUtil.getPrimitiveDefault(type);
      else newargs[a] = value == null ? null : set.convert(value, type);
     
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.