/** * Get string representing usage for this option, of the form "name metaval", * e.g. "-foo VALUE" or "--foo VALUE" * @param rb ResourceBundle to get localized version of meta string */ public final String getNameAndMeta(ResourceBundle rb) { return getNameAndMeta(rb, ParserProperties.defaults()); }
private int getPrefixLen(OptionHandler h, ResourceBundle rb) { if(h.option.usage().length()==0) return 0; return h.getNameAndMeta(rb, parserProperties).length(); }
/** * Get string representing usage for this option, of the form "name metaval", * e.g. "-foo VALUE" or "--foo VALUE" * @param rb ResourceBundle to get localized version of meta string */ public final String getNameAndMeta(ResourceBundle rb) { return getNameAndMeta(rb, ParserProperties.defaults()); }
private int getPrefixLen(OptionHandler h, ResourceBundle rb) { if(h.option.usage().length()==0) return 0; return h.getNameAndMeta(rb, parserProperties).length(); }
private void printSingleLineOption(PrintWriter pw, OptionHandler h, ResourceBundle rb) { pw.print(' '); if (!h.option.required()) pw.print('['); pw.print(h.getNameAndMeta(rb, parserProperties)); if (h.option.isMultiValued()) { pw.print(" ..."); } if (!h.option.required()) pw.print(']'); } }
private void printSingleLineOption(PrintWriter pw, OptionHandler h, ResourceBundle rb) { pw.print(' '); if (!h.option.required()) pw.print('['); pw.print(h.getNameAndMeta(rb, parserProperties)); if (h.option.isMultiValued()) { pw.print(" ..."); } if (!h.option.required()) pw.print(']'); } }
buf.append(h.getNameAndMeta(rb, parserProperties));
buf.append(h.getNameAndMeta(rb, parserProperties));
List<String> namesAndMetas = wrapLines(handler.getNameAndMeta(rb, parserProperties), widthMetadata);
List<String> namesAndMetas = wrapLines(handler.getNameAndMeta(rb, parserProperties), widthMetadata);
private int getPrefixLen(OptionHandler h, ResourceBundle rb) { if(h.option.usage().length()==0) return 0; return h.getNameAndMeta(rb, parserProperties).length(); }
/** * Get string representing usage for this option, of the form "name metaval", * e.g. "-foo VALUE" or "--foo VALUE" * @param rb ResourceBundle to get localized version of meta string */ public final String getNameAndMeta(ResourceBundle rb) { return getNameAndMeta(rb, ParserProperties.defaults()); }
private int getPrefixLen(OptionHandler h, ResourceBundle rb) { if(h.option.usage().length()==0) return 0; return h.getNameAndMeta(rb, parserProperties).length(); }
/** * Get string representing usage for this option, of the form "name metaval", * e.g. "-foo VALUE" or "--foo VALUE" * @param rb ResourceBundle to get localized version of meta string */ public final String getNameAndMeta(ResourceBundle rb) { return getNameAndMeta(rb, ParserProperties.defaults()); }
private void printSingleLineOption(PrintWriter pw, OptionHandler h, ResourceBundle rb) { pw.print(' '); if (!h.option.required()) pw.print('['); pw.print(h.getNameAndMeta(rb, parserProperties)); if (h.option.isMultiValued()) { pw.print(" ..."); } if (!h.option.required()) pw.print(']'); } }
private void printSingleLineOption(PrintWriter pw, OptionHandler h, ResourceBundle rb) { pw.print(' '); if (!h.option.required()) pw.print('['); pw.print(h.getNameAndMeta(rb, parserProperties)); if (h.option.isMultiValued()) { pw.print(" ..."); } if (!h.option.required()) pw.print(']'); } }
buf.append(h.getNameAndMeta(rb, parserProperties));
buf.append(h.getNameAndMeta(rb, parserProperties));
List<String> namesAndMetas = wrapLines(handler.getNameAndMeta(rb, parserProperties), widthMetadata);
private static void writeOptions(final XMLElement parent, @SuppressWarnings("rawtypes") final List<OptionHandler> list) throws IOException { for (final OptionHandler<?> o : list) { final XMLElement optionNode = parent.element("option"); optionNode.attr("required", String.valueOf(o.option.required())); optionNode.attr("multiple", String.valueOf(o.setter.isMultiValued())); optionNode.element("usage").text(o.getNameAndMeta(null)); optionNode.element("description").text(o.option.usage()); } }