src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/TraverseProc.java
author smarks
Mon, 25 Jun 2018 18:49:30 -0700
changeset 50776 cf0898a6441e
parent 48322 0cd5e2ca53dd
permissions -rw-r--r--
8205455: jdeprscan issues annotation processor warning regarding RELEASE_10 Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
40596
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
     1
/*
50776
cf0898a6441e 8205455: jdeprscan issues annotation processor warning regarding RELEASE_10
smarks
parents: 48322
diff changeset
     2
 * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
40596
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
     4
 *
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    10
 *
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    15
 * accompanied this code).
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    16
 *
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    20
 *
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    23
 * questions.
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    24
 */
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    25
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    26
package com.sun.tools.jdeprscan;
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    27
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    28
import java.util.ArrayList;
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    29
import java.util.Collection;
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    30
import java.util.Comparator;
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    31
import java.util.HashMap;
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    32
import java.util.HashSet;
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    33
import java.util.List;
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    34
import java.util.Map;
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    35
import java.util.Set;
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    36
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    37
import javax.annotation.processing.AbstractProcessor;
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    38
import javax.annotation.processing.Messager;
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    39
import javax.annotation.processing.ProcessingEnvironment;
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    40
import javax.annotation.processing.RoundEnvironment;
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    41
import javax.annotation.processing.SupportedAnnotationTypes;
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    42
import javax.annotation.processing.SupportedSourceVersion;
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    43
50776
cf0898a6441e 8205455: jdeprscan issues annotation processor warning regarding RELEASE_10
smarks
parents: 48322
diff changeset
    44
import javax.lang.model.SourceVersion;
40596
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    45
import javax.lang.model.element.Element;
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    46
import javax.lang.model.element.ElementKind;
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    47
import javax.lang.model.element.Modifier;
50776
cf0898a6441e 8205455: jdeprscan issues annotation processor warning regarding RELEASE_10
smarks
parents: 48322
diff changeset
    48
import javax.lang.model.element.ModuleElement;
40596
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    49
import javax.lang.model.element.PackageElement;
50776
cf0898a6441e 8205455: jdeprscan issues annotation processor warning regarding RELEASE_10
smarks
parents: 48322
diff changeset
    50
import javax.lang.model.element.TypeElement;
cf0898a6441e 8205455: jdeprscan issues annotation processor warning regarding RELEASE_10
smarks
parents: 48322
diff changeset
    51
import javax.lang.model.util.Elements;
40596
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    52
import javax.tools.Diagnostic;
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    53
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    54
@SupportedAnnotationTypes("*")
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    55
public class TraverseProc extends AbstractProcessor {
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    56
    Elements elements;
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    57
    Messager messager;
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    58
    final List<String> moduleRoots;
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    59
    Map<PackageElement, List<TypeElement>> publicTypes;
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    60
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    61
    TraverseProc(List<String> roots) {
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    62
        moduleRoots = roots;
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    63
    }
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    64
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    65
    @Override
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    66
    public void init(ProcessingEnvironment pe) {
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    67
        super.init(pe);
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    68
        elements = pe.getElementUtils();
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    69
        messager = pe.getMessager();
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    70
    }
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    71
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    72
    @Override
50776
cf0898a6441e 8205455: jdeprscan issues annotation processor warning regarding RELEASE_10
smarks
parents: 48322
diff changeset
    73
    public SourceVersion getSupportedSourceVersion() {
cf0898a6441e 8205455: jdeprscan issues annotation processor warning regarding RELEASE_10
smarks
parents: 48322
diff changeset
    74
        return SourceVersion.latest();
cf0898a6441e 8205455: jdeprscan issues annotation processor warning regarding RELEASE_10
smarks
parents: 48322
diff changeset
    75
    }
cf0898a6441e 8205455: jdeprscan issues annotation processor warning regarding RELEASE_10
smarks
parents: 48322
diff changeset
    76
cf0898a6441e 8205455: jdeprscan issues annotation processor warning regarding RELEASE_10
smarks
parents: 48322
diff changeset
    77
    @Override
40596
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    78
    public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    79
        if (roundEnv.processingOver()) {
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    80
            return false;
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    81
        }
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    82
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    83
        Set<ModuleElement> modules = new HashSet<>();
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    84
        for (String mname : moduleRoots) {
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    85
            ModuleElement me = elements.getModuleElement(mname);
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    86
            if (me == null) {
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    87
                messager.printMessage(Diagnostic.Kind.ERROR,
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    88
                                      String.format("module %s not found%n", mname));
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    89
            } else {
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    90
                modules.addAll(findModules(me));
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    91
            }
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    92
        }
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    93
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    94
        Set<PackageElement> packages = findPackages(modules);
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    95
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    96
        publicTypes = findPublicTypes(packages);
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    97
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    98
        return true;
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
    99
    }
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   100
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   101
    void printPublicTypes() {
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   102
        printPublicTypes(publicTypes);
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   103
    }
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   104
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   105
    public Map<PackageElement, List<TypeElement>> getPublicTypes() {
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   106
        return publicTypes;
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   107
    }
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   108
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   109
    void printPublicTypes(Map<PackageElement, List<TypeElement>> types) {
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   110
        System.out.println("All public types:");
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   111
        types.entrySet().stream()
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   112
             .sorted(Comparator.comparing(e -> e.getKey().toString()))
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   113
             .forEach(e -> {
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   114
                 System.out.println("  " + e.getKey());
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   115
                 e.getValue().stream()
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   116
                         .sorted(Comparator.comparing(TypeElement::toString))
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   117
                         .forEach(t -> System.out.println("    " + t));
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   118
             });
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   119
        System.out.println();
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   120
        System.out.flush();
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   121
    }
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   122
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   123
    Set<ModuleElement> findModules(ModuleElement root) {
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   124
        return findModules0(root, new HashSet<>(), 0);
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   125
    }
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   126
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   127
    Set<ModuleElement> findModules0(ModuleElement m, Set<ModuleElement> set, int nesting) {
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   128
        set.add(m);
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   129
        for (ModuleElement.Directive dir : m.getDirectives()) {
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   130
            if (dir.getKind() == ModuleElement.DirectiveKind.REQUIRES) {
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   131
                ModuleElement.RequiresDirective req = (ModuleElement.RequiresDirective)dir;
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   132
                findModules0(req.getDependency(), set, nesting + 1);
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   133
            }
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   134
        }
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   135
        return set;
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   136
    }
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   137
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   138
    Set<PackageElement> findPackages(Collection<ModuleElement> mods) {
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   139
        Set<PackageElement> set = new HashSet<>();
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   140
        for (ModuleElement m : mods) {
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   141
            for (ModuleElement.Directive dir : m.getDirectives()) {
42407
f3702cff2933 8169069: Module system implementation refresh (11/2016)
alanb
parents: 40596
diff changeset
   142
                if (dir.getKind() == ModuleElement.DirectiveKind.EXPORTS) { //XXX
40596
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   143
                    ModuleElement.ExportsDirective exp = (ModuleElement.ExportsDirective)dir;
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   144
                    if (exp.getTargetModules() == null) {
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   145
                        set.add(exp.getPackage());
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   146
                    }
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   147
                }
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   148
            }
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   149
        }
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   150
        return set;
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   151
    }
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   152
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   153
    Map<PackageElement, List<TypeElement>> findPublicTypes(Collection<PackageElement> pkgs) {
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   154
        Map<PackageElement, List<TypeElement>> map = new HashMap<>();
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   155
        for (PackageElement pkg : pkgs) {
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   156
            List<TypeElement> enclosed = new ArrayList<>();
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   157
            for (Element e : pkg.getEnclosedElements()) {
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   158
                addPublicTypes(enclosed, e);
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   159
            }
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   160
            map.put(pkg, enclosed);
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   161
        }
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   162
        return map;
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   163
    }
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   164
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   165
    void addPublicTypes(List<TypeElement> list, Element e) {
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   166
        ElementKind kind = e.getKind();
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   167
        if ((kind.isClass() || kind.isInterface())
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   168
                && e.getModifiers().contains(Modifier.PUBLIC)) {
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   169
            list.add((TypeElement)e);
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   170
            for (Element enc : e.getEnclosedElements()) {
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   171
                addPublicTypes(list, enc);
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   172
            }
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   173
        }
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   174
    }
43b19b36e8e6 8145464: implement deprecation static analysis tool
smarks
parents:
diff changeset
   175
}