1 20 package org.objectweb.modfact.corba.service.cmdline.io; 21 22 import org.objectweb.util.cmdline.lib.DefaultOptionBase; 23 24 27 public class OptionInput extends DefaultOptionBase { 28 29 32 protected ImportApplication application_; 33 34 38 public OptionInput(ImportApplication application) { 39 super(); 41 setLabels(new String [] { "-input" }); 42 setArguments(new String [] { "file" }); 43 setDescription(new String [] { "Set the XMI file to read" }); 44 setMandatory(true); 45 46 application_ = application; 48 } 49 50 54 58 public void consume(org.objectweb.util.cmdline.api.Iterator iterator) { 59 checkAlreadySet(iterator); 60 String file = consumeArgument(iterator); 61 application_.setInputFile(file); 62 } 63 64 } 65 | Popular Tags |