Source:
public static LauncherStatus run(final String[] args) throws InjectionException, IOException, ParseException, ConfigFileException, ClassNotFoundException, IllegalArgumentException, IllegalAccessException, NoSuchFieldException, SecurityException { final Tang tang = Tang.Factory.getTang(); try { final Class<? extends Name<?>>[] commandLineClasses = new Class[] { RuntimeClassName.class, DriverJobSubmissionDirectory.class, ConfigPath.class, JavaLibPath.class, NativeLibPath.class }; final Configuration commandLineConf = CommandLine.parseToConfiguration(args, commandLineClasses); final Injector commandLineInjector = tang.newInjector(commandLineConf); logStartupMessage(commandLineClasses, commandLineInjector); final String runtimeClassName = commandLineInjector.getNamedInstance(RuntimeClassName.class); final String driverJobSubmissionDirectory = commandLineInjector.isParameterSet(DriverJobSubmissionDirectory.class) ? commandLineInjector.getNamedInstance(DriverJobSubmissionDirectory.class) : null; final String configPath = commandLineInjector.getNamedInstance(ConfigPath.class); final String javaLibPath = commandLineInjector.getNamedInstance(JavaLibPath.class); final String nativeLibPath = commandLineInjector.getNamedInstance(NativeLibPath.class); final Configuration globalConf = getMyriaGlobalConf(configPath); final String serializedGlobalConf = new AvroConfigurationSerializer().toString(globalConf); final Configuration globalConfWrapper = tang.newConfigurationBuilder() .bindNamedParameter(SerializedGlobalConf.class, serializedGlobalConf) .build(); String driverHostName = getMasterHost(globalConf); int driverMemoryMB = getDriverMemory(globalConf); final Configuration driverConf = Configurations.merge( getDriverConf( driverJobSubmissionDirectory, driverHostName, driverMemoryMB, new String[] {javaLibPath}, new String[] {nativeLibPath}), globalConfWrapper); return tang.newInjector(getRuntimeConf(runtimeClassName), getClientConf()) .getInstance(MyriaDriverLauncher.class) .run(driverConf); } catch (ParseException | InjectionException e) { LOGGER.error("Problem with command line options", e); return LauncherStatus.FAILED; } }

Target:
public static LauncherStatus run(final String[] args) throws InjectionException, IOException, ParseException, ConfigFileException, ClassNotFoundException, IllegalArgumentException, IllegalAccessException, NoSuchFieldException, SecurityException { final Tang tang = Tang.Factory.getTang(); try { final Class<? extends Name<?>>[] commandLineClasses = new Class[] { RuntimeClassName.class, DriverJobSubmissionDirectory.class, ConfigPath.class, JavaLibPath.class, NativeLibPath.class }; final Configuration commandLineConf = CommandLine.parseToConfiguration(args, commandLineClasses); final Injector commandLineInjector = tang.newInjector(commandLineConf); LOGGER.info(genStartupMessage(commandLineClasses, commandLineInjector)); final String runtimeClassName = commandLineInjector.getNamedInstance(RuntimeClassName.class); final String driverJobSubmissionDirectory; if (commandLineInjector.isParameterSet(DriverJobSubmissionDirectory.class)) { driverJobSubmissionDirectory = commandLineInjector.getNamedInstance(DriverJobSubmissionDirectory.class); } else { driverJobSubmissionDirectory = null; } final String configPath = commandLineInjector.getNamedInstance(ConfigPath.class); final String javaLibPath = commandLineInjector.getNamedInstance(JavaLibPath.class); final String nativeLibPath = commandLineInjector.getNamedInstance(NativeLibPath.class); final Configuration globalConf = getMyriaGlobalConf(configPath); final String serializedGlobalConf = new AvroConfigurationSerializer().toString(globalConf); final Configuration globalConfWrapper = tang.newConfigurationBuilder() .bindNamedParameter(SerializedGlobalConf.class, serializedGlobalConf) .build(); final String driverHostName = getMasterHost(globalConf); final int driverMemoryMB = getDriverMemory(globalConf); final Configuration driverConf = Configurations.merge( getDriverConf( driverJobSubmissionDirectory, driverHostName, driverMemoryMB, new String[] {javaLibPath}, new String[] {nativeLibPath}), globalConfWrapper); return tang.newInjector(getRuntimeConf(runtimeClassName), getClientConf()) .getInstance(MyriaDriverLauncher.class) .run(driverConf); } catch (ParseException | InjectionException e) { LOGGER.error("Problem with command line options (see previous log message)", e); return LauncherStatus.FAILED; } }