jdk/test/tools/jlink/plugins/LastSorterTest.java
author sundar
Tue, 21 Jun 2016 19:05:34 +0530
changeset 39129 4b2086305b68
parent 38320 e24c7029e8ba
child 39321 c60f34e8c057
permissions -rw-r--r--
8159593: Plugin Set<Category> getType() should return a Category Reviewed-by: jlaskey
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
import jdk.tools.jlink.plugin.TransformerPlugin;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    49
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    50
public class LastSorterTest {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    51
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    52
    public LastSorterTest() {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    53
        for (int i = 1; i <= 6; i++) {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    54
            PluginRepository.registerPlugin(new SorterPlugin("sorterplugin" + i));
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
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    58
    public static void main(String[] args) throws Exception {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    59
        new LastSorterTest().test();
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    60
    }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    61
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    62
    public void test() throws Exception {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    63
        checkUnknownPlugin();
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    64
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    65
        checkOrderAfterLastSorter();
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    66
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    67
        checkPositiveCase();
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    68
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    69
        checkTwoLastSorters();
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    70
    }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    71
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    72
    private void checkTwoLastSorters() throws Exception {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    73
        List<Plugin> plugins = new ArrayList<>();
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    74
        plugins.add(createPlugin("sorterplugin5", "/a"));
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    75
        plugins.add(createPlugin("sorterplugin6", "/a"));
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    76
        PluginsConfiguration config = new Jlink.PluginsConfiguration(plugins,
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    77
                null, "sorterplugin5");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    78
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    79
        ImagePluginStack stack = ImagePluginConfiguration.parseConfiguration(config);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    80
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    81
        // check order
38320
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
    82
        ModulePoolImpl res = fillOutResourceModulePool();
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    83
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    84
        try {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    85
            stack.visitResources(res);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    86
            throw new AssertionError("Exception expected: Order of resources is already frozen." +
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    87
                    "Plugin sorterplugin6 is badly located");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    88
        } catch (Exception e) {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    89
            // expected
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    90
        }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    91
    }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    92
38320
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
    93
    private ModulePoolImpl fillOutResourceModulePool() throws Exception {
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
    94
        ModulePoolImpl res = new ModulePoolImpl();
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
    95
        res.add(ModuleEntry.create("/eee/bbb/res1.class", new byte[90]));
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
    96
        res.add(ModuleEntry.create("/aaaa/bbb/res2.class", new byte[90]));
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
    97
        res.add(ModuleEntry.create("/bbb/aa/res1.class", new byte[90]));
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
    98
        res.add(ModuleEntry.create("/aaaa/bbb/res3.class", new byte[90]));
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
    99
        res.add(ModuleEntry.create("/bbb/aa/res2.class", new byte[90]));
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
   100
        res.add(ModuleEntry.create("/fff/bbb/res1.class", new byte[90]));
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
   101
        res.add(ModuleEntry.create("/aaaa/bbb/res1.class", new byte[90]));
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
   102
        res.add(ModuleEntry.create("/bbb/aa/res3.class", new byte[90]));
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
   103
        res.add(ModuleEntry.create("/ccc/bbb/res1.class", new byte[90]));
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
   104
        res.add(ModuleEntry.create("/ddd/bbb/res1.class", new byte[90]));
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   105
        return res;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   106
    }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   107
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   108
    private static Plugin createPlugin(String name, String arg) {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   109
        Map<String, String> conf = new HashMap<>();
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   110
        conf.put(name, arg);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   111
        return Jlink.newPlugin(name, conf, null);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   112
    }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   113
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   114
    private void checkPositiveCase() throws Exception {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   115
        List<Plugin> plugins = new ArrayList<>();
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   116
        plugins.add(createPlugin("sorterplugin1", "/c"));
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   117
        plugins.add(createPlugin("sorterplugin2", "/b"));
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   118
        plugins.add(createPlugin("sorterplugin3", "/a"));
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   119
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   120
        PluginsConfiguration config = new Jlink.PluginsConfiguration(plugins,
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   121
                null, "sorterplugin3");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   122
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   123
        ImagePluginStack stack = ImagePluginConfiguration.parseConfiguration(config);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   124
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   125
        // check order
38320
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
   126
        ModulePoolImpl res = fillOutResourceModulePool();
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   127
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   128
        stack.visitResources(res);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   129
    }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   130
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   131
    private void checkUnknownPlugin() {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   132
        List<Plugin> plugins = new ArrayList<>();
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   133
        plugins.add(createPlugin("sorterplugin1", "/1"));
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   134
        plugins.add(createPlugin("sorterplugin2", "/1"));
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   135
        plugins.add(createPlugin("sorterplugin3", "/1"));
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   136
        plugins.add(createPlugin("sorterplugin4", "/1"));
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   137
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   138
        PluginsConfiguration config = new Jlink.PluginsConfiguration(plugins,
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   139
                null, "sorterplugin5");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   140
        try {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   141
            ImagePluginConfiguration.parseConfiguration(config);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   142
            throw new AssertionError("Unknown plugin should have failed.");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   143
        } catch (Exception ex) {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   144
            // XXX OK expected
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
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   148
    private void checkOrderAfterLastSorter() throws Exception {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   149
        List<Plugin> plugins = new ArrayList<>();
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   150
        plugins.add(createPlugin("sorterplugin1", "/c"));
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   151
        plugins.add(createPlugin("sorterplugin2", "/b"));
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   152
        plugins.add(createPlugin("sorterplugin3", "/a"));
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   153
        plugins.add(createPlugin("sorterplugin4", "/d"));
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   154
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   155
        PluginsConfiguration config = new Jlink.PluginsConfiguration(plugins,
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   156
                null, "sorterplugin3");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   157
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   158
        ImagePluginStack stack = ImagePluginConfiguration.parseConfiguration(config);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   159
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   160
        // check order
38320
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
   161
        ModulePoolImpl res = fillOutResourceModulePool();
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   162
        try {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   163
            stack.visitResources(res);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   164
            throw new AssertionError("Order was changed after the last sorter, but no exception occurred");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   165
        } catch (Exception ex) {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   166
            // XXX OK expected
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   167
        }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   168
    }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   169
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   170
    public static class SorterPlugin implements TransformerPlugin {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   171
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   172
        private final String name;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   173
        private String starts;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   174
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   175
        private SorterPlugin(String name) {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   176
            this.name = name;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   177
        }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   178
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   179
        @Override
38320
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
   180
        public void visit(ModulePool resources, ModulePool output) {
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
   181
            List<ModuleEntry> paths = new ArrayList<>();
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
   182
            resources.entries().forEach(res -> {
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   183
                if (res.getPath().startsWith(starts)) {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   184
                    paths.add(0, res);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   185
                } else {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   186
                    paths.add(res);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   187
                }
38320
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
   188
            });
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   189
38320
e24c7029e8ba 8156914: jlink API minor cleanups
sundar
parents: 36511
diff changeset
   190
            for (ModuleEntry r : paths) {
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   191
                output.add(r);
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
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   195
        @Override
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   196
        public String getName() {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   197
            return name;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   198
        }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   199
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   200
        @Override
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   201
        public void configure(Map<String, String> config) {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   202
            String arguments = config.get(name);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   203
            this.starts = arguments;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   204
        }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   205
    }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   206
}