for (int i = 0; i < syntaxes.length; i++) { try { return syntaxes[i].complete(partial.getRemainder()); } catch (CompletionException ex) {     } } System.out.println(); usage(); throw new CompletionException("Invalid command syntax"); }
String max = ""; for (int i = 0; i < syntaxes.length; i++) { try { final String s = syntaxes[ i].complete(partial .getRemainder()); if (s.length() > max.length()) { max = s; } } catch (CompletionException ex) {       } } if (max.length() > 0) { return max; } else { System.out.println(); usage(); throw new CompletionException("Invalid command syntax"); } }
		public String complete(CommandLine partial) throws CompletionException {			//System.out.println("completing \"" + partial + "\"");			for (int i = 0; i < syntaxes.length; i++) {				try {					return syntaxes[i].complete(partial.getRemainder());				} catch (CompletionException ex) {					// this syntax is not fitting					// following debug output is for testing the "intelligent" delegation mechanism					// System.err.println("Syntax \"" + syntaxes[i].getDescription() + "\" threw "					// + ex.toString());				}			}			System.out.println();			usage();			throw new CompletionException("Invalid command syntax");		}