< prev index next >

src/jdk.jdeps/share/classes/com/sun/tools/javap/JavapTask.java

Print this page
rev 47329 : 8189102: All tools should support -?, -h and --help


 106         boolean matches(String opt) {
 107             for (String a: aliases) {
 108                 if (a.equals(opt))
 109                     return true;
 110             }
 111             return false;
 112         }
 113 
 114         boolean ignoreRest() {
 115             return false;
 116         }
 117 
 118         abstract void process(JavapTask task, String opt, String arg) throws BadArgs;
 119 
 120         final boolean hasArg;
 121         final String[] aliases;
 122     }
 123 
 124     static final Option[] recognizedOptions = {
 125 
 126         new Option(false, "-help", "--help", "-?") {
 127             @Override
 128             void process(JavapTask task, String opt, String arg) {
 129                 task.options.help = true;
 130             }
 131         },
 132 
 133         new Option(false, "-version") {
 134             @Override
 135             void process(JavapTask task, String opt, String arg) {
 136                 task.options.version = true;
 137             }
 138         },
 139 
 140         new Option(false, "-fullversion") {
 141             @Override
 142             void process(JavapTask task, String opt, String arg) {
 143                 task.options.fullVersion = true;
 144             }
 145         },
 146 




 106         boolean matches(String opt) {
 107             for (String a: aliases) {
 108                 if (a.equals(opt))
 109                     return true;
 110             }
 111             return false;
 112         }
 113 
 114         boolean ignoreRest() {
 115             return false;
 116         }
 117 
 118         abstract void process(JavapTask task, String opt, String arg) throws BadArgs;
 119 
 120         final boolean hasArg;
 121         final String[] aliases;
 122     }
 123 
 124     static final Option[] recognizedOptions = {
 125 
 126         new Option(false, "-help", "--help", "-?", "-h") {
 127             @Override
 128             void process(JavapTask task, String opt, String arg) {
 129                 task.options.help = true;
 130             }
 131         },
 132 
 133         new Option(false, "-version") {
 134             @Override
 135             void process(JavapTask task, String opt, String arg) {
 136                 task.options.version = true;
 137             }
 138         },
 139 
 140         new Option(false, "-fullversion") {
 141             @Override
 142             void process(JavapTask task, String opt, String arg) {
 143                 task.options.fullVersion = true;
 144             }
 145         },
 146 


< prev index next >