1 26 27 package org.objectweb.util.cmdline.lib; 28 29 import org.objectweb.util.misc.lib.StringBufferHelper; 30 31 import org.objectweb.util.cmdline.api.Usage; 32 33 41 42 public abstract class UsageHelper 43 { 44 50 56 62 68 76 static public String 77 usageLabelsAsString(Usage usage, 78 String separator) 79 { 80 StringBuffer sb = new StringBuffer (); 81 StringBufferHelper.append(sb, usage.getLabels(), separator); 82 return sb.toString(); 83 } 84 85 93 static public String 94 usageArgumentsAsString(Usage usage, 95 String separator) 96 { 97 StringBuffer sb = new StringBuffer (); 98 StringBufferHelper.append(sb, usage.getArguments(), separator); 99 return sb.toString(); 100 } 101 102 110 static public String 111 usageDescriptionAsString(Usage usage, 112 String separator) 113 { 114 StringBuffer sb = new StringBuffer (); 115 StringBufferHelper.append(sb, usage.getDescription(), separator); 116 return sb.toString(); 117 } 118 119 } 125 | Popular Tags |