1 20 package org.objectweb.modfact.corba.service.cmdline.xmiio; 21 22 import org.objectweb.util.cmdline.lib.DefaultOptionBase; 23 24 27 public class OptionNameService extends DefaultOptionBase { 28 29 30 protected XMIIOApplication application_; 31 32 36 public OptionNameService(XMIIOApplication application) { 37 super(); 39 setLabels(new String [] { "-NameService" }); 40 setArguments(new String [] { "name" }); 41 setDescription(new String [] { "Set the associated name in the Name Service" }); 42 setMandatory(false); 43 44 application_ = application; 46 } 47 48 52 56 public void consume(org.objectweb.util.cmdline.api.Iterator iterator) { 57 checkAlreadySet(iterator); 58 String name = consumeArgument(iterator); 59 application_.setNameService(name); 60 } 61 62 } 63 | Popular Tags |