< prev index next >

langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/options/Option.java

Print this page




  46  *
  47  * This enum represents all options from (1) and (2). Note that instances of
  48  * this enum only entail static information about the option. For storage of
  49  * option values, refer to com.sun.tools.sjavac.options.Options.
  50  *
  51  *  <p><b>This is NOT part of any supported API.
  52  *  If you write code that depends on this, you do so at your own risk.
  53  *  This code and its internal interfaces are subject to change or
  54  *  deletion without notice.</b>
  55  */
  56 public enum Option {
  57 
  58     SRC("-src", "Location of source files to be compiled") {
  59         @Override
  60         protected void processMatching(ArgumentIterator iter, OptionHelper helper) {
  61             List<Path> paths = getFileListArg(iter, helper);
  62             if (paths != null)
  63                 helper.sourceRoots(paths);
  64         }
  65     },
  66     SOURCEPATH("-sourcepath", "Specify search path for sources.") {
  67         @Override
  68         protected void processMatching(ArgumentIterator iter, OptionHelper helper) {
  69             List<Path> paths = getFileListArg(iter, helper);
  70             if (paths != null)
  71                 helper.sourcepath(paths);
  72         }
  73     },
  74     MODULEPATH("-modulepath", "Specify search path for modules.") {






  75         @Override
  76         protected void processMatching(ArgumentIterator iter, OptionHelper helper) {
  77             List<Path> paths = getFileListArg(iter, helper);
  78             if (paths != null)
  79                 helper.modulepath(paths);
  80         }
  81     },
  82     CLASSPATH("-classpath", "Specify search path for classes.") {












  83         @Override
  84         protected void processMatching(ArgumentIterator iter, OptionHelper helper) {
  85             List<Path> paths = getFileListArg(iter, helper);
  86             if (paths != null)
  87                 helper.classpath(paths);
  88         }
  89     },






  90     CP("-cp", "An alias for -classpath") {
  91         @Override
  92         protected void processMatching(ArgumentIterator iter, OptionHelper helper) {
  93             CLASSPATH.processMatching(iter, helper);
  94         }
  95     },
  96     X("-x", "Exclude files matching the given pattern") {
  97         @Override
  98         protected void processMatching(ArgumentIterator iter, OptionHelper helper) {
  99             String pattern = getFilePatternArg(iter, helper);
 100             if (pattern != null)
 101                 helper.exclude(pattern);
 102         }
 103     },
 104     I("-i", "Include only files matching the given pattern") {
 105         @Override
 106         protected void processMatching(ArgumentIterator iter, OptionHelper helper) {
 107             String pattern = getFilePatternArg(iter, helper);
 108             if (pattern != null)
 109                 helper.include(pattern);
 110         }
 111     },
 112     TR("-tr", "Translate resources") {
 113         @Override




  46  *
  47  * This enum represents all options from (1) and (2). Note that instances of
  48  * this enum only entail static information about the option. For storage of
  49  * option values, refer to com.sun.tools.sjavac.options.Options.
  50  *
  51  *  <p><b>This is NOT part of any supported API.
  52  *  If you write code that depends on this, you do so at your own risk.
  53  *  This code and its internal interfaces are subject to change or
  54  *  deletion without notice.</b>
  55  */
  56 public enum Option {
  57 
  58     SRC("-src", "Location of source files to be compiled") {
  59         @Override
  60         protected void processMatching(ArgumentIterator iter, OptionHelper helper) {
  61             List<Path> paths = getFileListArg(iter, helper);
  62             if (paths != null)
  63                 helper.sourceRoots(paths);
  64         }
  65     },
  66     SOURCE_PATH("--source-path", "Specify search path for sources.") {
  67         @Override
  68         protected void processMatching(ArgumentIterator iter, OptionHelper helper) {
  69             List<Path> paths = getFileListArg(iter, helper);
  70             if (paths != null)
  71                 helper.sourcepath(paths);
  72         }
  73     },
  74     SOURCEPATH("-sourcepath", "An alias for -sourcepath") {
  75         @Override
  76         protected void processMatching(ArgumentIterator iter, OptionHelper helper) {
  77             SOURCE_PATH.processMatching(iter, helper);
  78         }
  79     },
  80     MODULE_PATH("--module-path", "Specify search path for modules.") {
  81         @Override
  82         protected void processMatching(ArgumentIterator iter, OptionHelper helper) {
  83             List<Path> paths = getFileListArg(iter, helper);
  84             if (paths != null)
  85                 helper.modulepath(paths);
  86         }
  87     },
  88     MODULEPATH("-modulepath", "An alias for -modulepath") {
  89         @Override
  90         protected void processMatching(ArgumentIterator iter, OptionHelper helper) {
  91             MODULE_PATH.processMatching(iter, helper);
  92         }
  93     },
  94     P("-p", "An alias for -modulepath") {
  95         @Override
  96         protected void processMatching(ArgumentIterator iter, OptionHelper helper) {
  97             MODULE_PATH.processMatching(iter, helper);
  98         }
  99     },
 100     CLASS_PATH("--class-path", "Specify search path for classes.") {
 101         @Override
 102         protected void processMatching(ArgumentIterator iter, OptionHelper helper) {
 103             List<Path> paths = getFileListArg(iter, helper);
 104             if (paths != null)
 105                 helper.classpath(paths);
 106         }
 107     },
 108     CLASSPATH("-classpath", "An alias for -classpath.") {
 109         @Override
 110         protected void processMatching(ArgumentIterator iter, OptionHelper helper) {
 111             CLASS_PATH.processMatching(iter, helper);
 112         }
 113     },
 114     CP("-cp", "An alias for -classpath") {
 115         @Override
 116         protected void processMatching(ArgumentIterator iter, OptionHelper helper) {
 117             CLASS_PATH.processMatching(iter, helper);
 118         }
 119     },
 120     X("-x", "Exclude files matching the given pattern") {
 121         @Override
 122         protected void processMatching(ArgumentIterator iter, OptionHelper helper) {
 123             String pattern = getFilePatternArg(iter, helper);
 124             if (pattern != null)
 125                 helper.exclude(pattern);
 126         }
 127     },
 128     I("-i", "Include only files matching the given pattern") {
 129         @Override
 130         protected void processMatching(ArgumentIterator iter, OptionHelper helper) {
 131             String pattern = getFilePatternArg(iter, helper);
 132             if (pattern != null)
 133                 helper.include(pattern);
 134         }
 135     },
 136     TR("-tr", "Translate resources") {
 137         @Override


< prev index next >