53 import jdk.tools.jlink.internal.TaskHelper.Option;
54 import jdk.tools.jlink.internal.TaskHelper.OptionsHelper;
55 import jdk.tools.jlink.internal.Utils;
56
57 class JImageTask {
58 private static final Option<?>[] RECOGNIZED_OPTIONS = {
59 new Option<JImageTask>(true, (task, option, arg) -> {
60 task.options.directory = arg;
61 }, "--dir"),
62
63 new Option<JImageTask>(true, (task, option, arg) -> {
64 task.options.include = arg;
65 }, "--include"),
66
67 new Option<JImageTask>(false, (task, option, arg) -> {
68 task.options.fullVersion = true;
69 }, true, "--full-version"),
70
71 new Option<JImageTask>(false, (task, option, arg) -> {
72 task.options.help = true;
73 }, "--help", "-h"),
74
75 new Option<JImageTask>(false, (task, option, arg) -> {
76 task.options.verbose = true;
77 }, "--verbose"),
78
79 new Option<JImageTask>(false, (task, option, arg) -> {
80 task.options.version = true;
81 }, "--version")
82 };
83 private static final TaskHelper TASK_HELPER
84 = new TaskHelper(JIMAGE_BUNDLE);
85 private static final OptionsHelper<JImageTask> OPTION_HELPER
86 = TASK_HELPER.newOptionsHelper(JImageTask.class, RECOGNIZED_OPTIONS);
87 private static final String PROGNAME = "jimage";
88 private static final FileSystem JRT_FILE_SYSTEM = Utils.jrtFileSystem();
89
90 private final OptionsValues options;
91 private final List<Predicate<String>> includePredicates;
92 private PrintWriter log;
93
|
53 import jdk.tools.jlink.internal.TaskHelper.Option;
54 import jdk.tools.jlink.internal.TaskHelper.OptionsHelper;
55 import jdk.tools.jlink.internal.Utils;
56
57 class JImageTask {
58 private static final Option<?>[] RECOGNIZED_OPTIONS = {
59 new Option<JImageTask>(true, (task, option, arg) -> {
60 task.options.directory = arg;
61 }, "--dir"),
62
63 new Option<JImageTask>(true, (task, option, arg) -> {
64 task.options.include = arg;
65 }, "--include"),
66
67 new Option<JImageTask>(false, (task, option, arg) -> {
68 task.options.fullVersion = true;
69 }, true, "--full-version"),
70
71 new Option<JImageTask>(false, (task, option, arg) -> {
72 task.options.help = true;
73 }, "--help", "-h", "-?"),
74
75 new Option<JImageTask>(false, (task, option, arg) -> {
76 task.options.verbose = true;
77 }, "--verbose"),
78
79 new Option<JImageTask>(false, (task, option, arg) -> {
80 task.options.version = true;
81 }, "--version")
82 };
83 private static final TaskHelper TASK_HELPER
84 = new TaskHelper(JIMAGE_BUNDLE);
85 private static final OptionsHelper<JImageTask> OPTION_HELPER
86 = TASK_HELPER.newOptionsHelper(JImageTask.class, RECOGNIZED_OPTIONS);
87 private static final String PROGNAME = "jimage";
88 private static final FileSystem JRT_FILE_SYSTEM = Utils.jrtFileSystem();
89
90 private final OptionsValues options;
91 private final List<Predicate<String>> includePredicates;
92 private PrintWriter log;
93
|