1 9 import com.vladium.emma.IAppConstants; 10 import com.vladium.emma.Command; 11 import com.vladium.emma.EMMARuntimeException; 12 13 17 public 18 final class emma 19 { 20 22 24 public static void main (final String [] args) 25 throws EMMARuntimeException 26 { 27 29 if ((args.length == 0) || args [0].startsWith ("-h")) 30 { 31 System.out.println (USAGE); 32 return; 33 } 34 35 final String commandName = args [0]; 36 final String [] commandArgs = new String [args.length - 1]; 37 System.arraycopy (args, 1, commandArgs, 0, commandArgs.length); 38 39 final Command command = Command.create (commandName, "emma ".concat (commandName), commandArgs); 40 command.run (); 41 } 42 43 45 47 49 50 private static final String EOL = System.getProperty ("line.separator", "\n"); 51 52 private static final String USAGE = 53 "emma usage: emma <command> [command options]," + EOL + 54 " where <command> is one of:" + EOL + 55 EOL + 56 " run application runner {same as 'emmarun' tool};" + EOL + 57 " instr offline instrumentation processor;" + EOL + 58 " report offline report generator;" + EOL + 59 " merge offline data file merge processor." + EOL + 60 EOL + 61 " {use '<command> -h' to see usage help for a given command}" + EOL + 62 EOL + 63 IAppConstants.APP_USAGE_BUILD_ID; 64 65 } | Popular Tags |