jdk/test/tools/jlink/plugins/LastSorterTest.java
author sundar
Thu, 30 Jun 2016 22:24:01 +0530
changeset 39321 c60f34e8c057
parent 39129 4b2086305b68
child 39834 53a6fb443c20
permissions -rw-r--r--
8160641: PostProcessingPlugin and ExecutableImage should not be part of plugin API Reviewed-by: jlaskey, mchung
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     1
/*
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     2
 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     4
 *
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     7
 * published by the Free Software Foundation.
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     8
 *
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    13
 * accompanied this code).
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    14
 *
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    18
 *
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    21
 * questions.
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    22
 */
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    23
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    24
/*
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    25
 * @test
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    26
 * @summary Test last sorter property
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    27
 * @author Jean-Francois Denise
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    28
 * @modules jdk.jlink/jdk.tools.jlink.internal
38320
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
    29
 *          jdk.jlink/jdk.tools.jlink
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    30
 * @run main/othervm LastSorterTest
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    31
 */
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    32
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    33
import java.util.ArrayList;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    34
import java.util.Collections;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    35
import java.util.HashMap;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    36
import java.util.List;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    37
import java.util.Map;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    38
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    39
import jdk.tools.jlink.internal.ImagePluginConfiguration;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    40
import jdk.tools.jlink.internal.PluginRepository;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    41
import jdk.tools.jlink.internal.ImagePluginStack;
38320
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
    42
import jdk.tools.jlink.internal.ModulePoolImpl;
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    43
import jdk.tools.jlink.Jlink;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    44
import jdk.tools.jlink.Jlink.PluginsConfiguration;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    45
import jdk.tools.jlink.plugin.Plugin;
38320
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
    46
import jdk.tools.jlink.plugin.ModuleEntry;
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
    47
import jdk.tools.jlink.plugin.ModulePool;
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    48
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    49
public class LastSorterTest {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    50
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    51
    public LastSorterTest() {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    52
        for (int i = 1; i <= 6; i++) {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    53
            PluginRepository.registerPlugin(new SorterPlugin("sorterplugin" + i));
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    54
        }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    55
    }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    56
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    57
    public static void main(String[] args) throws Exception {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    58
        new LastSorterTest().test();
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    59
    }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    60
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    61
    public void test() throws Exception {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    62
        checkUnknownPlugin();
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    63
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    64
        checkOrderAfterLastSorter();
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    65
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    66
        checkPositiveCase();
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    67
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    68
        checkTwoLastSorters();
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    69
    }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    70
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    71
    private void checkTwoLastSorters() throws Exception {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    72
        List<Plugin> plugins = new ArrayList<>();
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    73
        plugins.add(createPlugin("sorterplugin5", "/a"));
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    74
        plugins.add(createPlugin("sorterplugin6", "/a"));
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    75
        PluginsConfiguration config = new Jlink.PluginsConfiguration(plugins,
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    76
                null, "sorterplugin5");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    77
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    78
        ImagePluginStack stack = ImagePluginConfiguration.parseConfiguration(config);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    79
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    80
        // check order
38320
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
    81
        ModulePoolImpl res = fillOutResourceModulePool();
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    82
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    83
        try {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    84
            stack.visitResources(res);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    85
            throw new AssertionError("Exception expected: Order of resources is already frozen." +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    86
                    "Plugin sorterplugin6 is badly located");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    87
        } catch (Exception e) {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    88
            // expected
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    89
        }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    90
    }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    91
38320
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
    92
    private ModulePoolImpl fillOutResourceModulePool() throws Exception {
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
    93
        ModulePoolImpl res = new ModulePoolImpl();
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
    94
        res.add(ModuleEntry.create("/eee/bbb/res1.class", new byte[90]));
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
    95
        res.add(ModuleEntry.create("/aaaa/bbb/res2.class", new byte[90]));
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
    96
        res.add(ModuleEntry.create("/bbb/aa/res1.class", new byte[90]));
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
    97
        res.add(ModuleEntry.create("/aaaa/bbb/res3.class", new byte[90]));
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
    98
        res.add(ModuleEntry.create("/bbb/aa/res2.class", new byte[90]));
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
    99
        res.add(ModuleEntry.create("/fff/bbb/res1.class", new byte[90]));
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
   100
        res.add(ModuleEntry.create("/aaaa/bbb/res1.class", new byte[90]));
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
   101
        res.add(ModuleEntry.create("/bbb/aa/res3.class", new byte[90]));
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
   102
        res.add(ModuleEntry.create("/ccc/bbb/res1.class", new byte[90]));
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
   103
        res.add(ModuleEntry.create("/ddd/bbb/res1.class", new byte[90]));
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   104
        return res;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   105
    }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   106
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   107
    private static Plugin createPlugin(String name, String arg) {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   108
        Map<String, String> conf = new HashMap<>();
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   109
        conf.put(name, arg);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   110
        return Jlink.newPlugin(name, conf, null);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   111
    }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   112
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   113
    private void checkPositiveCase() throws Exception {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   114
        List<Plugin> plugins = new ArrayList<>();
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   115
        plugins.add(createPlugin("sorterplugin1", "/c"));
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   116
        plugins.add(createPlugin("sorterplugin2", "/b"));
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   117
        plugins.add(createPlugin("sorterplugin3", "/a"));
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   118
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   119
        PluginsConfiguration config = new Jlink.PluginsConfiguration(plugins,
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   120
                null, "sorterplugin3");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   121
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   122
        ImagePluginStack stack = ImagePluginConfiguration.parseConfiguration(config);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   123
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   124
        // check order
38320
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
   125
        ModulePoolImpl res = fillOutResourceModulePool();
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   126
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   127
        stack.visitResources(res);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   128
    }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   129
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   130
    private void checkUnknownPlugin() {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   131
        List<Plugin> plugins = new ArrayList<>();
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   132
        plugins.add(createPlugin("sorterplugin1", "/1"));
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   133
        plugins.add(createPlugin("sorterplugin2", "/1"));
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   134
        plugins.add(createPlugin("sorterplugin3", "/1"));
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   135
        plugins.add(createPlugin("sorterplugin4", "/1"));
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   136
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   137
        PluginsConfiguration config = new Jlink.PluginsConfiguration(plugins,
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   138
                null, "sorterplugin5");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   139
        try {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   140
            ImagePluginConfiguration.parseConfiguration(config);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   141
            throw new AssertionError("Unknown plugin should have failed.");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   142
        } catch (Exception ex) {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   143
            // XXX OK expected
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   144
        }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   145
    }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   146
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   147
    private void checkOrderAfterLastSorter() throws Exception {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   148
        List<Plugin> plugins = new ArrayList<>();
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   149
        plugins.add(createPlugin("sorterplugin1", "/c"));
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   150
        plugins.add(createPlugin("sorterplugin2", "/b"));
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   151
        plugins.add(createPlugin("sorterplugin3", "/a"));
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   152
        plugins.add(createPlugin("sorterplugin4", "/d"));
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   153
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   154
        PluginsConfiguration config = new Jlink.PluginsConfiguration(plugins,
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   155
                null, "sorterplugin3");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   156
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   157
        ImagePluginStack stack = ImagePluginConfiguration.parseConfiguration(config);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   158
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   159
        // check order
38320
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
   160
        ModulePoolImpl res = fillOutResourceModulePool();
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   161
        try {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   162
            stack.visitResources(res);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   163
            throw new AssertionError("Order was changed after the last sorter, but no exception occurred");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   164
        } catch (Exception ex) {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   165
            // XXX OK expected
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   166
        }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   167
    }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   168
39321
c60f34e8c057 8160641: PostProcessingPlugin and ExecutableImage should not be part of plugin API
sundar
parents: 39129
diff changeset
   169
    public static class SorterPlugin implements Plugin {
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   170
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   171
        private final String name;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   172
        private String starts;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   173
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   174
        private SorterPlugin(String name) {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   175
            this.name = name;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   176
        }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   177
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   178
        @Override
38320
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
   179
        public void visit(ModulePool resources, ModulePool output) {
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
   180
            List<ModuleEntry> paths = new ArrayList<>();
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
   181
            resources.entries().forEach(res -> {
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   182
                if (res.getPath().startsWith(starts)) {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   183
                    paths.add(0, res);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   184
                } else {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   185
                    paths.add(res);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   186
                }
38320
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
   187
            });
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   188
38320
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
   189
            for (ModuleEntry r : paths) {
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   190
                output.add(r);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   191
            }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   192
        }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   193
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   194
        @Override
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   195
        public String getName() {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   196
            return name;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   197
        }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   198
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   199
        @Override
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   200
        public void configure(Map<String, String> config) {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   201
            String arguments = config.get(name);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   202
            this.starts = arguments;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   203
        }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   204
    }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   205
}