| 1 | /* |
| 2 | * Copyright 2006 Sun Microsystems, Inc. All Rights Reserved. |
| 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
| 4 | * |
| 5 | * This code is free software; you can redistribute it and/or modify it |
| 6 | * under the terms of the GNU General Public License version 2 only, as |
| 7 | * published by the Free Software Foundation. Sun designates this |
| 8 | * particular file as subject to the "Classpath" exception as provided |
| 9 | * by Sun in the LICENSE file that accompanied this code. |
| 10 | * |
| 11 | * This code is distributed in the hope that it will be useful, but WITHOUT |
| 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
| 14 | * version 2 for more details (a copy is included in the LICENSE file that |
| 15 | * accompanied this code). |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License version |
| 18 | * 2 along with this work; if not, write to the Free Software Foundation, |
| 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
| 20 | * |
| 21 | * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
| 22 | * CA 95054 USA or visit www.sun.com if you need additional information or |
| 23 | * have any questions. |
| 24 | */ |
| 25 | |
| 26 | package com.sun.tools.javac.main; |
| 27 | |
| 28 | |
| 29 | /** |
| 30 | * TODO: describe com.sun.tools.javac.main.OptionName |
| 31 | * |
| 32 | * <p><b>This is NOT part of any API supported by Sun Microsystems. |
| 33 | * If you write code that depends on this, you do so at your own |
| 34 | * risk. This code and its internal interfaces are subject to change |
| 35 | * or deletion without notice.</b></p> |
| 36 | */ |
| 37 | public enum OptionName { |
| 38 | G("-g"), |
| 39 | G_NONE("-g:none"), |
| 40 | G_CUSTOM("-g:{lines,vars,source}"), |
| 41 | XLINT("-Xlint"), |
| 42 | XLINT_CUSTOM("-Xlint:{" |
| 43 | + "all," |
| 44 | + "cast,deprecation,divzero,empty,unchecked,fallthrough,path,serial,finally,overrides," |
| 45 | + "-cast,-deprecation,-divzero,-empty,-unchecked,-fallthrough,-path,-serial,-finally,-overrides," |
| 46 | + "none}"), |
| 47 | NOWARN("-nowarn"), |
| 48 | VERBOSE("-verbose"), |
| 49 | DEPRECATION("-deprecation"), |
| 50 | CLASSPATH("-classpath"), |
| 51 | CP("-cp"), |
| 52 | SOURCEPATH("-sourcepath"), |
| 53 | BOOTCLASSPATH("-bootclasspath"), |
| 54 | XBOOTCLASSPATH_PREPEND("-Xbootclasspath/p:"), |
| 55 | XBOOTCLASSPATH_APPEND("-Xbootclasspath/a:"), |
| 56 | XBOOTCLASSPATH("-Xbootclasspath:"), |
| 57 | EXTDIRS("-extdirs"), |
| 58 | DJAVA_EXT_DIRS("-Djava.ext.dirs="), |
| 59 | ENDORSEDDIRS("-endorseddirs"), |
| 60 | DJAVA_ENDORSED_DIRS("-Djava.endorsed.dirs="), |
| 61 | PROC_CUSTOM("-proc:{none,only}"), |
| 62 | PROCESSOR("-processor"), |
| 63 | PROCESSORPATH("-processorpath"), |
| 64 | D("-d"), |
| 65 | S("-s"), |
| 66 | IMPLICIT("-implicit:{none,class}"), |
| 67 | ENCODING("-encoding"), |
| 68 | SOURCE("-source"), |
| 69 | TARGET("-target"), |
| 70 | VERSION("-version"), |
| 71 | FULLVERSION("-fullversion"), |
| 72 | HELP("-help"), |
| 73 | A("-A"), |
| 74 | X("-X"), |
| 75 | J("-J"), |
| 76 | MOREINFO("-moreinfo"), |
| 77 | WERROR("-Werror"), |
| 78 | COMPLEXINFERENCE("-complexinference"), |
| 79 | PROMPT("-prompt"), |
| 80 | DOE("-doe"), |
| 81 | PRINTSOURCE("-printsource"), |
| 82 | WARNUNCHECKED("-warnunchecked"), |
| 83 | XMAXERRS("-Xmaxerrs"), |
| 84 | XMAXWARNS("-Xmaxwarns"), |
| 85 | XSTDOUT("-Xstdout"), |
| 86 | XPRINT("-Xprint"), |
| 87 | XPRINTROUNDS("-XprintRounds"), |
| 88 | XPRINTPROCESSORINFO("-XprintProcessorInfo"), |
| 89 | XPREFER("-Xprefer:{source,newer}"), |
| 90 | O("-O"), |
| 91 | XJCOV("-Xjcov"), |
| 92 | XD("-XD"), |
| 93 | SOURCEFILE("sourcefile"); |
| 94 | |
| 95 | public final String optionName; |
| 96 | |
| 97 | OptionName(String optionName) { |
| 98 | this.optionName = optionName; |
| 99 | } |
| 100 | |
| 101 | @Override |
| 102 | public String toString() { |
| 103 | return optionName; |
| 104 | } |
| 105 | |
| 106 | } |