src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/IndexBuilder.java
equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
33 import javax.lang.model.element.TypeElement; |
33 import javax.lang.model.element.TypeElement; |
34 |
34 |
35 import jdk.javadoc.doclet.DocletEnvironment; |
35 import jdk.javadoc.doclet.DocletEnvironment; |
36 import jdk.javadoc.internal.doclets.toolkit.BaseConfiguration; |
36 import jdk.javadoc.internal.doclets.toolkit.BaseConfiguration; |
37 import jdk.javadoc.internal.doclets.toolkit.Messages; |
37 import jdk.javadoc.internal.doclets.toolkit.Messages; |
38 import jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberMap.Kind; |
38 |
|
39 import static jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberTable.Kind.*; |
39 |
40 |
40 /** |
41 /** |
41 * Build the mapping of each Unicode character with it's member lists |
42 * Build the mapping of each Unicode character with it's member lists |
42 * containing members names starting with it. Also build a list for all the |
43 * containing members names starting with it. Also build a list for all the |
43 * Unicode characters which start a member name. Member name is |
44 * Unicode characters which start a member name. Member name is |
163 * @param te TypeElement whose members will be added to the indexmap. |
164 * @param te TypeElement whose members will be added to the indexmap. |
164 */ |
165 */ |
165 protected void putMembersInIndexMap(TypeElement te) { |
166 protected void putMembersInIndexMap(TypeElement te) { |
166 adjustIndexMap(utils.getAnnotationFields(te)); |
167 adjustIndexMap(utils.getAnnotationFields(te)); |
167 adjustIndexMap(utils.getFields(te)); |
168 adjustIndexMap(utils.getFields(te)); |
168 VisibleMemberMap vmm = configuration.getVisibleMemberMap(te, Kind.METHODS); |
169 VisibleMemberTable vmt = configuration.getVisibleMemberTable(te); |
169 adjustIndexMap(vmm.getMembers(te)); |
170 adjustIndexMap(vmt.getMembers(METHODS)); |
170 adjustIndexMap(utils.getConstructors(te)); |
171 adjustIndexMap(utils.getConstructors(te)); |
171 adjustIndexMap(utils.getEnumConstants(te)); |
172 adjustIndexMap(utils.getEnumConstants(te)); |
172 } |
173 } |
173 |
174 |
174 |
175 |
214 |
215 |
215 /** |
216 /** |
216 * Should this element be added to the index map? |
217 * Should this element be added to the index map? |
217 */ |
218 */ |
218 protected boolean shouldAddToIndexMap(Element element) { |
219 protected boolean shouldAddToIndexMap(Element element) { |
219 if (utils.isHidden(element)) { |
220 if (utils.hasHiddenTag(element)) { |
220 return false; |
221 return false; |
221 } |
222 } |
222 |
223 |
223 if (utils.isPackage(element)) |
224 if (utils.isPackage(element)) |
224 // Do not add to index map if -nodeprecated option is set and the |
225 // Do not add to index map if -nodeprecated option is set and the |