1 26 27 package org.objectweb.openccm.corba.idl2java; 28 29 import org.objectweb.util.cmdline.lib.DefaultOptionBase; 31 32 33 40 public abstract class PreprocessorOptionBase 41 extends DefaultOptionBase 42 implements PreprocessorOption 43 { 44 50 56 57 public PreprocessorOptionBase() 58 { 59 super(); 61 62 setArguments(new String [0]); 63 setMandatory(false); 64 } 65 66 72 78 85 public boolean check(String current) { 86 String baseOptionLabel = getBaseOptionLabel(); 87 88 if (!current.startsWith(baseOptionLabel)) { 89 return false; 90 } 91 92 consumeOption(current.substring(baseOptionLabel.length())); 93 return true; 94 } 95 96 101 public void 102 consume(org.objectweb.util.cmdline.api.Iterator iterator) { 103 } 105 106 112 117 public abstract String getBaseOptionLabel(); 118 119 124 public abstract void consumeOption(String current); 125 126 132 } 133 | Popular Tags |