94 *
95 * @param configuration the current configuration of the doclet.
96 * @param noDeprecated true if -nodeprecated option is used,
97 * false otherwise.
98 * @param classesOnly Include only classes in index.
99 */
100 public IndexBuilder(BaseConfiguration configuration, boolean noDeprecated,
101 boolean classesOnly) {
102 this.configuration = configuration;
103 this.utils = configuration.utils;
104
105 Messages messages = configuration.getMessages();
106 if (classesOnly) {
107 messages.notice("doclet.Building_Index_For_All_Classes");
108 } else {
109 messages.notice("doclet.Building_Index");
110 }
111
112 this.noDeprecated = noDeprecated;
113 this.classesOnly = classesOnly;
114 this.javafx = configuration.javafx;
115 this.indexmap = new TreeMap<>();
116 comparator = classesOnly
117 ? utils.makeAllClassesComparator()
118 : utils.makeIndexUseComparator();
119 buildIndexMap(configuration.docEnv);
120 }
121
122 /**
123 * Get all the members in all the Packages and all the Classes
124 * given on the command line. Form separate list of those members depending
125 * upon their names.
126 *
127 * @param docEnv the doclet environment
128 */
129 protected void buildIndexMap(DocletEnvironment docEnv) {
130 Set<PackageElement> packages = configuration.getSpecifiedPackageElements();
131 Set<TypeElement> classes = configuration.getIncludedTypeElements();
132 if (!classesOnly) {
133 if (packages.isEmpty()) {
134 Set<PackageElement> set = new HashSet<>();
|
94 *
95 * @param configuration the current configuration of the doclet.
96 * @param noDeprecated true if -nodeprecated option is used,
97 * false otherwise.
98 * @param classesOnly Include only classes in index.
99 */
100 public IndexBuilder(BaseConfiguration configuration, boolean noDeprecated,
101 boolean classesOnly) {
102 this.configuration = configuration;
103 this.utils = configuration.utils;
104
105 Messages messages = configuration.getMessages();
106 if (classesOnly) {
107 messages.notice("doclet.Building_Index_For_All_Classes");
108 } else {
109 messages.notice("doclet.Building_Index");
110 }
111
112 this.noDeprecated = noDeprecated;
113 this.classesOnly = classesOnly;
114 this.javafx = configuration.getOptions().javafx;
115 this.indexmap = new TreeMap<>();
116 comparator = classesOnly
117 ? utils.makeAllClassesComparator()
118 : utils.makeIndexUseComparator();
119 buildIndexMap(configuration.docEnv);
120 }
121
122 /**
123 * Get all the members in all the Packages and all the Classes
124 * given on the command line. Form separate list of those members depending
125 * upon their names.
126 *
127 * @param docEnv the doclet environment
128 */
129 protected void buildIndexMap(DocletEnvironment docEnv) {
130 Set<PackageElement> packages = configuration.getSpecifiedPackageElements();
131 Set<TypeElement> classes = configuration.getIncludedTypeElements();
132 if (!classesOnly) {
133 if (packages.isEmpty()) {
134 Set<PackageElement> set = new HashSet<>();
|