FileDocCategorySizeDatePackage
Launcher.javaAPI DocAndroid 5.1 API4033Thu Mar 12 22:22:08 GMT 2015com.android.commands.uiautomator

Launcher

public class Launcher extends Object
Entry point into the uiautomator command line This class maintains the list of sub commands, and redirect the control into it based on the command line arguments. It also prints out help arguments for each sub commands. To add a new sub command, implement {@link Command} and add an instance into COMMANDS array

Fields Summary
private static Command
HELP_COMMAND
private static Command[]
COMMANDS
Constructors Summary
Methods Summary
private static com.android.commands.uiautomator.Launcher$CommandfindCommand(java.lang.String name)

        for (Command command : COMMANDS) {
            if (command.name().equals(name)) {
                return command;
            }
        }
        return null;
    
public static voidmain(java.lang.String[] args)

        // show a meaningful process name in `ps`
        Process.setArgV0("uiautomator");
        if (args.length >= 1) {
            Command command = findCommand(args[0]);
            if (command != null) {
                String[] args2 = {};
                if (args.length > 1) {
                    // consume the first arg
                    args2 = Arrays.copyOfRange(args, 1, args.length);
                }
                command.run(args2);
                return;
            }
        }
        HELP_COMMAND.run(args);