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