@Test public void excluded() throws Exception { Result pr = ShellCommandParser.parse("shell"); assertEquals(0, pr.getRemainingArgs().length); assertEquals(ShellCommand.class, pr.getFirstCommand()); List<Class<? extends Command>> excluded = new ArrayList<>(); excluded.add(ShellCommand.class); pr = ShellCommandParser.parse("bibliography", excluded); assertEquals(0, pr.getRemainingArgs().length); assertEquals(BibliographyCommand.class, pr.getFirstCommand()); pr = ShellCommandParser.parse("shell", excluded); assertEquals(1, pr.getRemainingArgs().length); assertEquals("shell", pr.getRemainingArgs()[0]); assertNull(pr.getFirstCommand()); assertNull(pr.getLastCommand()); }
public static Result parse(String line) throws IntrospectionException, InvalidOptionException { return parse(line, Collections.emptyList()); }
ShellCommandParser { public static Result parse(String line) throws IntrospectionException, InvalidOptionException { return parse(line, Collections.emptyList()); } }
ShellCommandParser { public static Result parse(String line) throws IntrospectionException, InvalidOptionException { return parse(line, Collections.emptyList()); } private  ShellCommandParser(); }
ShellCommandParser { public static Result parse(String line) throws IntrospectionException, InvalidOptionException { return parse(line, Collections.emptyList()); } private  ShellCommandParser(); static String[] split(String line); static Result parse(String line); static Result parse(String line,
            Collection<Class<? extends Command>> excluded); static Result parse(String[] args,
            Collection<Class<? extends Command>> excluded); }
ShellCommandParser { public static Result parse(String line) throws IntrospectionException, InvalidOptionException { return parse(line, Collections.emptyList()); } private  ShellCommandParser(); static String[] split(String line); static Result parse(String line); static Result parse(String line,
            Collection<Class<? extends Command>> excluded); static Result parse(String[] args,
            Collection<Class<? extends Command>> excluded);  }