langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/PlatformClassPath.java
author jfdenise
Thu, 25 Jun 2015 18:00:52 +0200
changeset 31753 72417309a675
parent 30846 2b3f379840f0
child 34752 9c262a013456
permissions -rw-r--r--
8080511: Refresh of jimage support Reviewed-by: alanb, mchung, psandoz, acorn, lfoltan, ctornqvi Contributed-by: james.laskey@oracle.com, jean-francois.denise@oracle.com, sundararajan.athijegannathan@oracle.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
15030
2d8dec41f029 8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
diff changeset
     1
/*
25442
755ff386d1ac 8029548: (jdeps) use @jdk.Exported to determine supported vs JDK internal API
mchung
parents: 21046
diff changeset
     2
 * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
15030
2d8dec41f029 8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2d8dec41f029 8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
diff changeset
     4
 *
2d8dec41f029 8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
2d8dec41f029 8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
2d8dec41f029 8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2d8dec41f029 8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
2d8dec41f029 8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2d8dec41f029 8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
diff changeset
    10
 *
2d8dec41f029 8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
2d8dec41f029 8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2d8dec41f029 8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2d8dec41f029 8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
2d8dec41f029 8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
diff changeset
    15
 * accompanied this code).
2d8dec41f029 8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
diff changeset
    16
 *
2d8dec41f029 8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
2d8dec41f029 8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
2d8dec41f029 8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2d8dec41f029 8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
diff changeset
    20
 *
2d8dec41f029 8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2d8dec41f029 8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
2d8dec41f029 8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
diff changeset
    23
 * questions.
2d8dec41f029 8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
diff changeset
    24
 */
2d8dec41f029 8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
diff changeset
    25
package com.sun.tools.jdeps;
2d8dec41f029 8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
diff changeset
    26
25442
755ff386d1ac 8029548: (jdeps) use @jdk.Exported to determine supported vs JDK internal API
mchung
parents: 21046
diff changeset
    27
import com.sun.tools.classfile.ClassFile;
27579
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
    28
import com.sun.tools.jdeps.ClassFileReader.ModuleClassReader;
15030
2d8dec41f029 8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
diff changeset
    29
import java.io.IOException;
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25442
diff changeset
    30
import java.io.InputStream;
26276
0dca2378aa34 8055856: checkdeps build target doesn't work for cross-compilation builds
mchung
parents: 25874
diff changeset
    31
import java.io.BufferedInputStream;
27579
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
    32
import java.net.URI;
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
    33
import java.nio.file.*;
15030
2d8dec41f029 8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
diff changeset
    34
import java.nio.file.attribute.BasicFileAttributes;
2d8dec41f029 8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
diff changeset
    35
import java.util.*;
27579
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
    36
import java.util.stream.Collectors;
25442
755ff386d1ac 8029548: (jdeps) use @jdk.Exported to determine supported vs JDK internal API
mchung
parents: 21046
diff changeset
    37
15030
2d8dec41f029 8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
diff changeset
    38
/**
2d8dec41f029 8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
diff changeset
    39
 * ClassPath for Java SE and JDK
2d8dec41f029 8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
diff changeset
    40
 */
2d8dec41f029 8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
diff changeset
    41
class PlatformClassPath {
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25442
diff changeset
    42
    private static List<Archive> modules;
27579
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
    43
    static synchronized List<Archive> getModules(Path mpath) throws IOException {
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25442
diff changeset
    44
        if (modules == null) {
27579
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
    45
            initPlatformModules(mpath);
21046
ebf16a1a6328 8015912: jdeps support to output in dot file format
mchung
parents: 16560
diff changeset
    46
        }
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25442
diff changeset
    47
        return modules;
15030
2d8dec41f029 8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
diff changeset
    48
    }
21046
ebf16a1a6328 8015912: jdeps support to output in dot file format
mchung
parents: 16560
diff changeset
    49
27579
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
    50
    private static void initPlatformModules(Path mpath) throws IOException {
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
    51
        ImageHelper helper = ImageHelper.getInstance(mpath);
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
    52
        String fn = System.getProperty("jdeps.modules.xml");
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
    53
        if (fn != null) {
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
    54
            Path p = Paths.get(fn);
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
    55
            try (InputStream in = new BufferedInputStream(Files.newInputStream(p))) {
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
    56
                modules = new ArrayList<>(ModulesXmlReader.load(helper, in));
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
    57
            }
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
    58
        } else {
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
    59
            try (InputStream in = PlatformClassPath.class
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
    60
                    .getResourceAsStream("resources/jdeps-modules.xml")) {
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
    61
                modules = new ArrayList<>(ModulesXmlReader.load(helper, in));
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
    62
            }
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
    63
        }
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
    64
        if (findModule("java.base") != null) {
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
    65
            Profile.initProfiles(modules);
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
    66
        }
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
    67
    }
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
    68
21046
ebf16a1a6328 8015912: jdeps support to output in dot file format
mchung
parents: 16560
diff changeset
    69
    /**
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25442
diff changeset
    70
     * Finds the module with the given name. Returns null
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25442
diff changeset
    71
     * if such module doesn't exist.
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25442
diff changeset
    72
     *
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25442
diff changeset
    73
     * @param mn module name
21046
ebf16a1a6328 8015912: jdeps support to output in dot file format
mchung
parents: 16560
diff changeset
    74
     */
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25442
diff changeset
    75
    static Module findModule(String mn) {
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25442
diff changeset
    76
        for (Archive a : modules) {
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25442
diff changeset
    77
            if (Module.class.isInstance(a)) {
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25442
diff changeset
    78
                Module m = (Module)a;
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25442
diff changeset
    79
                if (mn.equals(m.name())) {
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25442
diff changeset
    80
                    return m;
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25442
diff changeset
    81
                }
25442
755ff386d1ac 8029548: (jdeps) use @jdk.Exported to determine supported vs JDK internal API
mchung
parents: 21046
diff changeset
    82
            }
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25442
diff changeset
    83
        }
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25442
diff changeset
    84
        return null;
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25442
diff changeset
    85
    }
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25442
diff changeset
    86
27579
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
    87
    /**
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
    88
     * Returns JAR files in $java.home/lib.  This is for transition until
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
    89
     * all components are linked into jimage.
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
    90
     */
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
    91
    static List<Archive> getJarFiles() throws IOException {
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
    92
        Path home = Paths.get(System.getProperty("java.home"), "lib");
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
    93
        return Files.find(home, 1, (Path p, BasicFileAttributes attr)
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
    94
                -> p.getFileName().toString().endsWith(".jar"))
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
    95
                .map(Archive::getInstance)
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
    96
                .collect(Collectors.toList());
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25442
diff changeset
    97
    }
25442
755ff386d1ac 8029548: (jdeps) use @jdk.Exported to determine supported vs JDK internal API
mchung
parents: 21046
diff changeset
    98
27579
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
    99
    static class ImageHelper {
31753
72417309a675 8080511: Refresh of jimage support
jfdenise
parents: 30846
diff changeset
   100
        private static boolean isJrtAvailable() {
72417309a675 8080511: Refresh of jimage support
jfdenise
parents: 30846
diff changeset
   101
            try {
72417309a675 8080511: Refresh of jimage support
jfdenise
parents: 30846
diff changeset
   102
                FileSystems.getFileSystem(URI.create("jrt:/"));
72417309a675 8080511: Refresh of jimage support
jfdenise
parents: 30846
diff changeset
   103
                return true;
72417309a675 8080511: Refresh of jimage support
jfdenise
parents: 30846
diff changeset
   104
            } catch (ProviderNotFoundException | FileSystemNotFoundException e) {
72417309a675 8080511: Refresh of jimage support
jfdenise
parents: 30846
diff changeset
   105
                return false;
72417309a675 8080511: Refresh of jimage support
jfdenise
parents: 30846
diff changeset
   106
            }
72417309a675 8080511: Refresh of jimage support
jfdenise
parents: 30846
diff changeset
   107
        }
72417309a675 8080511: Refresh of jimage support
jfdenise
parents: 30846
diff changeset
   108
27579
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
   109
        static ImageHelper getInstance(Path mpath) throws IOException {
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
   110
            if (mpath != null) {
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
   111
                return new ImageHelper(mpath);
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
   112
            }
31753
72417309a675 8080511: Refresh of jimage support
jfdenise
parents: 30846
diff changeset
   113
72417309a675 8080511: Refresh of jimage support
jfdenise
parents: 30846
diff changeset
   114
            if (isJrtAvailable()) {
72417309a675 8080511: Refresh of jimage support
jfdenise
parents: 30846
diff changeset
   115
                // jrt file system
27579
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
   116
                FileSystem fs = FileSystems.getFileSystem(URI.create("jrt:/"));
31753
72417309a675 8080511: Refresh of jimage support
jfdenise
parents: 30846
diff changeset
   117
                return new ImageHelper(fs, fs.getPath("/modules"));
27579
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
   118
            } else {
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
   119
                // exploded modules
31753
72417309a675 8080511: Refresh of jimage support
jfdenise
parents: 30846
diff changeset
   120
                String home = System.getProperty("java.home");
72417309a675 8080511: Refresh of jimage support
jfdenise
parents: 30846
diff changeset
   121
                Path exploded = Paths.get(home, "modules");
72417309a675 8080511: Refresh of jimage support
jfdenise
parents: 30846
diff changeset
   122
                if (!Files.isDirectory(exploded)) {
72417309a675 8080511: Refresh of jimage support
jfdenise
parents: 30846
diff changeset
   123
                     throw new InternalError(home + " not a modular image");
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25442
diff changeset
   124
                }
31753
72417309a675 8080511: Refresh of jimage support
jfdenise
parents: 30846
diff changeset
   125
                return new ImageHelper(exploded);
25442
755ff386d1ac 8029548: (jdeps) use @jdk.Exported to determine supported vs JDK internal API
mchung
parents: 21046
diff changeset
   126
            }
755ff386d1ac 8029548: (jdeps) use @jdk.Exported to determine supported vs JDK internal API
mchung
parents: 21046
diff changeset
   127
        }
755ff386d1ac 8029548: (jdeps) use @jdk.Exported to determine supported vs JDK internal API
mchung
parents: 21046
diff changeset
   128
27579
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
   129
        private final FileSystem fs;
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
   130
        private final Path mpath;
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
   131
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
   132
        ImageHelper(Path path) throws IOException {
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
   133
            this(FileSystems.getDefault(), path);
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25442
diff changeset
   134
        }
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25442
diff changeset
   135
27579
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
   136
        ImageHelper(FileSystem fs, Path path) throws IOException {
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
   137
            this.fs = fs;
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
   138
            this.mpath = path;
25442
755ff386d1ac 8029548: (jdeps) use @jdk.Exported to determine supported vs JDK internal API
mchung
parents: 21046
diff changeset
   139
        }
755ff386d1ac 8029548: (jdeps) use @jdk.Exported to determine supported vs JDK internal API
mchung
parents: 21046
diff changeset
   140
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25442
diff changeset
   141
        /**
27579
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
   142
         * Returns a ModuleClassReader that only reads classes for the given modulename.
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25442
diff changeset
   143
         */
27579
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
   144
        public ModuleClassReader getModuleClassReader(String modulename)
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
   145
            throws IOException
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
   146
        {
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
   147
            Path mp = mpath.resolve(modulename);
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
   148
            if (Files.exists(mp) && Files.isDirectory(mp)) {
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
   149
                return new ModuleClassReader(fs, modulename, mp);
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
   150
            } else {
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
   151
                // aggregator module or os-specific module in jdeps-modules.xml
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
   152
                // mdir not exist
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
   153
                return new NonExistModuleReader(fs, modulename, mp);
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25442
diff changeset
   154
            }
27579
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
   155
        }
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25442
diff changeset
   156
27579
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
   157
        static class NonExistModuleReader extends ModuleClassReader {
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
   158
            private final List<ClassFile> classes = Collections.emptyList();
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25442
diff changeset
   159
27579
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
   160
            private NonExistModuleReader(FileSystem fs, String mn, Path mpath)
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
   161
                throws IOException
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
   162
            {
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
   163
                super(fs, mn, mpath);
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25442
diff changeset
   164
            }
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25442
diff changeset
   165
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25442
diff changeset
   166
            public ClassFile getClassFile(String name) throws IOException {
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25442
diff changeset
   167
                return null;
25442
755ff386d1ac 8029548: (jdeps) use @jdk.Exported to determine supported vs JDK internal API
mchung
parents: 21046
diff changeset
   168
            }
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25442
diff changeset
   169
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25442
diff changeset
   170
            public Iterable<ClassFile> getClassFiles() throws IOException {
27579
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
   171
                return classes;
25874
83c19f00452c 8054834: Modular Source Code
chegar
parents: 25442
diff changeset
   172
            }
25442
755ff386d1ac 8029548: (jdeps) use @jdk.Exported to determine supported vs JDK internal API
mchung
parents: 21046
diff changeset
   173
27579
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
   174
            public Set<String> packages() {
d1a63c99cdd5 8049367: Modular Run-Time Images
chegar
parents: 26276
diff changeset
   175
                return Collections.emptySet();
25442
755ff386d1ac 8029548: (jdeps) use @jdk.Exported to determine supported vs JDK internal API
mchung
parents: 21046
diff changeset
   176
            }
21046
ebf16a1a6328 8015912: jdeps support to output in dot file format
mchung
parents: 16560
diff changeset
   177
        }
ebf16a1a6328 8015912: jdeps support to output in dot file format
mchung
parents: 16560
diff changeset
   178
    }
15030
2d8dec41f029 8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
diff changeset
   179
}