src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/ClassUseMapper.java
changeset 49879 601277b1d582
parent 48759 ffa68af7da87
child 50370 676b7c44eeae
equal deleted inserted replaced
49878:2422d4e027b0 49879:601277b1d582
    45 import javax.lang.model.util.SimpleTypeVisitor9;
    45 import javax.lang.model.util.SimpleTypeVisitor9;
    46 import javax.lang.model.util.Types;
    46 import javax.lang.model.util.Types;
    47 
    47 
    48 import jdk.javadoc.doclet.DocletEnvironment;
    48 import jdk.javadoc.doclet.DocletEnvironment;
    49 import jdk.javadoc.internal.doclets.toolkit.BaseConfiguration;
    49 import jdk.javadoc.internal.doclets.toolkit.BaseConfiguration;
    50 import jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberMap.Kind;
    50 
       
    51 import static jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberTable.Kind.*;
    51 
    52 
    52 /**
    53 /**
    53  * Map all class uses for a given class.
    54  * Map all class uses for a given class.
    54  *
    55  *
    55  * <p>
    56  * <p>
   241             for (ExecutableElement ctor : ctors) {
   242             for (ExecutableElement ctor : ctors) {
   242                 mapAnnotations(classToConstructorAnnotations, ctor, ctor);
   243                 mapAnnotations(classToConstructorAnnotations, ctor, ctor);
   243                 mapExecutable(ctor);
   244                 mapExecutable(ctor);
   244             }
   245             }
   245 
   246 
   246             VisibleMemberMap vmm = configuration.getVisibleMemberMap(aClass, Kind.METHODS);
   247             VisibleMemberTable vmt = configuration.getVisibleMemberTable(aClass);
   247             List<ExecutableElement> methods = ElementFilter.methodsIn(vmm.getMembers(aClass));
   248             List<ExecutableElement> methods = ElementFilter.methodsIn(vmt.getMembers(METHODS));
       
   249 
   248             for (ExecutableElement method : methods) {
   250             for (ExecutableElement method : methods) {
   249                 mapExecutable(method);
   251                 mapExecutable(method);
   250                 mapTypeParameters(classToMethodTypeParam, method, method);
   252                 mapTypeParameters(classToMethodTypeParam, method, method);
   251                 mapAnnotations(classToMethodAnnotations, method, method);
   253                 mapAnnotations(classToMethodAnnotations, method, method);
   252                 SimpleTypeVisitor9<Void, ExecutableElement> stv = new SimpleTypeVisitor9<Void, ExecutableElement>() {
   254                 SimpleTypeVisitor9<Void, ExecutableElement> stv = new SimpleTypeVisitor9<Void, ExecutableElement>() {
   552 
   554 
   553     /**
   555     /**
   554      * Map the AnnotationType to the members that use them as type parameters.
   556      * Map the AnnotationType to the members that use them as type parameters.
   555      *
   557      *
   556      * @param map the map the insert the information into.
   558      * @param map the map the insert the information into.
   557      * @param element whose type parameters are being checked.
   559      * @param e whose type parameters are being checked.
   558      * @param holder the holder that owns the type parameters.
   560      * @param holder owning the type parameters.
   559      */
   561      */
   560     private <T extends Element> void mapAnnotations(final Map<TypeElement, List<T>> map,
   562     private <T extends Element> void mapAnnotations(final Map<TypeElement, List<T>> map,
   561             Element e, final T holder) {
   563             Element e, final T holder) {
   562         new SimpleElementVisitor9<Void, Void>() {
   564         new SimpleElementVisitor9<Void, Void>() {
   563 
   565