@Override public void printSynopsisSection(CommandDescriptor<?> descriptor, Appendable stream) throws IOException { man.printSynopsisSection(descriptor, stream); // Extra stream section if (match.getDescriptor().getSubordinates().isEmpty()) { stream.append("STREAM\n"); stream.append(Util.MAN_TAB); printFQN(descriptor, stream); stream.append(" <").append(commandMatch.getConsumedType().getName()).append(", ").append(commandMatch.getProducedType().getName()).append('>'); stream.append("\n\n"); } } };
match.getDescriptor().print(format, buffer); return buffer.toString();
private <T> Test(Class<T> type, String s) { try { CommandDescriptor<Instance<T>> command = CommandFactory.DEFAULT.create(type); InvocationMatcher<Instance<T>> parser = command.matcher(); InvocationMatch<Instance<T>> match = parser.parse(s); // if (match.owner() == null) { this.sharedOptionMatches = new LinkedList<OptionMatch>(); this.optionMatches = new LinkedList<OptionMatch>(match.options()); this.argumentMatches = new LinkedList<ArgumentMatch>(match.arguments()); this.rest = match.getRest(); this.methodName = null; } else { this.sharedOptionMatches = new LinkedList<OptionMatch>(match.owner().options()); this.optionMatches = new LinkedList<OptionMatch>(match.options()); this.argumentMatches = new LinkedList<ArgumentMatch>(match.arguments()); this.rest = match.getRest(); this.methodName = match.getDescriptor().getName(); } } catch (Exception e) { AssertionFailedError afe = new AssertionFailedError(); afe.initCause(e); throw afe; } }
bilto(argumentEvent.getValues()) ); if (argumentEvent.getCommand() == current.getDescriptor()) { current.argument(match); } else {
@Override public void printSynopsisSection(CommandDescriptor<?> descriptor, Appendable stream) throws IOException { man.printSynopsisSection(descriptor, stream); // Extra stream section if (match.getDescriptor().getSubordinates().isEmpty()) { stream.append("STREAM\n"); stream.append(Util.MAN_TAB); printFQN(descriptor, stream); stream.append(" <").append(commandMatch.getConsumedType().getName()).append(", ").append(commandMatch.getProducedType().getName()).append('>'); stream.append("\n\n"); } } };
@Override public void printSynopsisSection(CommandDescriptor<?> descriptor, Appendable stream) throws IOException { man.printSynopsisSection(descriptor, stream); // Extra stream section if (match.getDescriptor().getSubordinates().isEmpty()) { stream.append("STREAM\n"); stream.append(Util.MAN_TAB); printFQN(descriptor, stream); stream.append(" <").append(commandMatch.getConsumedType().getName()).append(", ").append(commandMatch.getProducedType().getName()).append('>'); stream.append("\n\n"); } } };
match.getDescriptor().print(format, buffer); return buffer.toString();
match.getDescriptor().print(format, buffer); return buffer.toString();
switch (mode) { case DESCRIBE: return match.getDescriptor().getUsage(); case MAN: StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); match.getDescriptor().printMan(pw); return sw.toString(); case USAGE: StringWriter sw2 = new StringWriter(); PrintWriter pw2 = new PrintWriter(sw2); match.getDescriptor().printUsage(pw2); return sw2.toString();
bilto(argumentEvent.getValues()) ); if (argumentEvent.getCommand() == current.getDescriptor()) { current.argument(match); } else {
bilto(argumentEvent.getValues()) ); if (argumentEvent.getCommand() == current.getDescriptor()) { current.argument(match); } else {