1 28 29 package org.objectweb.util.launcher.option; 30 31 32 import org.objectweb.util.cmdline.api.Iterator; 33 import org.objectweb.util.cmdline.lib.DefaultOptionArgument; 34 import org.objectweb.util.launcher.CommandFactory; 35 36 37 47 public class OptionArg 48 extends DefaultOptionArgument 49 { 50 51 public final static String shortTag = "-arg" ; 52 53 public final static String longTag = "--argument" ; 54 55 58 public OptionArg(){ 59 super(new String []{shortTag, longTag}, 60 "<Argument>", 61 "The value of the argument", 62 ""); 63 } 64 65 71 76 public void consume(Iterator iterator) { 77 setArgument(consumeArgument(iterator)); 78 CommandFactory.instance().getDefaultArguments().add(getArgument()); 79 } 80 81 86 public static String create(String value) { 87 return shortTag+" "+value+" " ; 88 } 89 } 90 | Popular Tags |