@Test public void w_arguments() throws Exception { LauncherOptions options = parse(new String[] { MockTool.class.getName(), "hello1", "hello2", "hello3", }); assertThat(options.getApplicationClass(), is((Object) MockTool.class)); assertThat(options.getApplicationArguments(), hasItems("hello1", "hello2", "hello3")); assertThat(options.getApplicationCacheDirectories(), hasSize(0)); }
public static LauncherOptions parse( Configuration configuration, String... args) throws IOException, InterruptedException { LauncherOptionsParser parser = new LauncherOptionsParser(configuration, args); boolean success = false; try { LauncherOptions result = parser.analyze(); success = true; return result; } finally { parser.cleanUp(success); } }
LauncherOptionsParser { public static LauncherOptions parse( Configuration configuration, String... args) throws IOException, InterruptedException { LauncherOptionsParser parser = new LauncherOptionsParser(configuration, args); boolean success = false; try { LauncherOptions result = parser.analyze(); success = true; return result; } finally { parser.cleanUp(success); } } }
LauncherOptionsParser { public static LauncherOptions parse( Configuration configuration, String... args) throws IOException, InterruptedException { LauncherOptionsParser parser = new LauncherOptionsParser(configuration, args); boolean success = false; try { LauncherOptions result = parser.analyze(); success = true; return result; } finally { parser.cleanUp(success); } } private  LauncherOptionsParser(Configuration configuration, String[] args); }
LauncherOptionsParser { public static LauncherOptions parse( Configuration configuration, String... args) throws IOException, InterruptedException { LauncherOptionsParser parser = new LauncherOptionsParser(configuration, args); boolean success = false; try { LauncherOptions result = parser.analyze(); success = true; return result; } finally { parser.cleanUp(success); } } private  LauncherOptionsParser(Configuration configuration, String[] args); static LauncherOptions parse(
            Configuration configuration,
            String... args); }
LauncherOptionsParser { public static LauncherOptions parse( Configuration configuration, String... args) throws IOException, InterruptedException { LauncherOptionsParser parser = new LauncherOptionsParser(configuration, args); boolean success = false; try { LauncherOptions result = parser.analyze(); success = true; return result; } finally { parser.cleanUp(success); } } private  LauncherOptionsParser(Configuration configuration, String[] args); static LauncherOptions parse(
            Configuration configuration,
            String... args); static final String KEY_CACHE_ENABLED; static final String KEY_CACHE_REPOSITORY; static final String KEY_CACHE_RETRY_COUNT; static final String KEY_CACHE_RETRY_INTERVAL; static final String KEY_CACHE_TEMPORARY; static final String KEY_MAX_THREADS; static final String KEY_CACHE_JOBJAR; }