< prev index next >

src/jdk.jlink/share/classes/jdk/tools/jmod/JmodTask.java

Print this page
rev 48495 : 8189102: All tools should support -?, -h and --help
Reviewed-by: kvn, jjg, weijun, alanb, rfield, ksrini
   1 /*
   2  * Copyright (c) 2015, 2017, Oracle and/or its affiliates. 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.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


1292 
1293         OptionSpec<Path> dir
1294                 = parser.accepts("dir", getMessage("main.opt.extractDir"))
1295                         .withRequiredArg()
1296                         .withValuesConvertedBy(new ExtractDirPathConverter());
1297 
1298         OptionSpec<Void> dryrun
1299                 = parser.accepts("dry-run", getMessage("main.opt.dry-run"));
1300 
1301         OptionSpec<PathMatcher> excludes
1302                 = parser.accepts("exclude", getMessage("main.opt.exclude"))
1303                         .withRequiredArg()
1304                         .withValuesConvertedBy(new PathMatcherConverter());
1305 
1306         OptionSpec<Pattern> hashModules
1307                 = parser.accepts("hash-modules", getMessage("main.opt.hash-modules"))
1308                         .withRequiredArg()
1309                         .withValuesConvertedBy(new PatternConverter());
1310 
1311         OptionSpec<Void> help
1312                 = parser.acceptsAll(Set.of("h", "help"), getMessage("main.opt.help"))
1313                         .forHelp();
1314 
1315         OptionSpec<Void> helpExtra
1316                 = parser.accepts("help-extra", getMessage("main.opt.help-extra"));
1317 
1318         OptionSpec<List<Path>> headerFiles
1319                 = parser.accepts("header-files", getMessage("main.opt.header-files"))
1320                         .withRequiredArg()
1321                         .withValuesConvertedBy(DirPathConverter.INSTANCE);
1322 
1323         OptionSpec<List<Path>> libs
1324                 = parser.accepts("libs", getMessage("main.opt.libs"))
1325                         .withRequiredArg()
1326                         .withValuesConvertedBy(DirPathConverter.INSTANCE);
1327 
1328         OptionSpec<List<Path>> legalNotices
1329                 = parser.accepts("legal-notices", getMessage("main.opt.legal-notices"))
1330                         .withRequiredArg()
1331                         .withValuesConvertedBy(DirPathConverter.INSTANCE);
1332 


   1 /*
   2  * Copyright (c) 2015, 2018, Oracle and/or its affiliates. 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.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


1292 
1293         OptionSpec<Path> dir
1294                 = parser.accepts("dir", getMessage("main.opt.extractDir"))
1295                         .withRequiredArg()
1296                         .withValuesConvertedBy(new ExtractDirPathConverter());
1297 
1298         OptionSpec<Void> dryrun
1299                 = parser.accepts("dry-run", getMessage("main.opt.dry-run"));
1300 
1301         OptionSpec<PathMatcher> excludes
1302                 = parser.accepts("exclude", getMessage("main.opt.exclude"))
1303                         .withRequiredArg()
1304                         .withValuesConvertedBy(new PathMatcherConverter());
1305 
1306         OptionSpec<Pattern> hashModules
1307                 = parser.accepts("hash-modules", getMessage("main.opt.hash-modules"))
1308                         .withRequiredArg()
1309                         .withValuesConvertedBy(new PatternConverter());
1310 
1311         OptionSpec<Void> help
1312                 = parser.acceptsAll(Set.of("h", "help", "?"), getMessage("main.opt.help"))
1313                         .forHelp();
1314 
1315         OptionSpec<Void> helpExtra
1316                 = parser.accepts("help-extra", getMessage("main.opt.help-extra"));
1317 
1318         OptionSpec<List<Path>> headerFiles
1319                 = parser.accepts("header-files", getMessage("main.opt.header-files"))
1320                         .withRequiredArg()
1321                         .withValuesConvertedBy(DirPathConverter.INSTANCE);
1322 
1323         OptionSpec<List<Path>> libs
1324                 = parser.accepts("libs", getMessage("main.opt.libs"))
1325                         .withRequiredArg()
1326                         .withValuesConvertedBy(DirPathConverter.INSTANCE);
1327 
1328         OptionSpec<List<Path>> legalNotices
1329                 = parser.accepts("legal-notices", getMessage("main.opt.legal-notices"))
1330                         .withRequiredArg()
1331                         .withValuesConvertedBy(DirPathConverter.INSTANCE);
1332 


< prev index next >