langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/DeprecatedAPIListBuilder.java
equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1998, 2017, 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 |
30 import javax.lang.model.element.Element; |
30 import javax.lang.model.element.Element; |
31 import javax.lang.model.element.ModuleElement; |
31 import javax.lang.model.element.ModuleElement; |
32 import javax.lang.model.element.PackageElement; |
32 import javax.lang.model.element.PackageElement; |
33 import javax.lang.model.element.TypeElement; |
33 import javax.lang.model.element.TypeElement; |
34 |
34 |
35 import jdk.javadoc.internal.doclets.toolkit.Configuration; |
35 import jdk.javadoc.internal.doclets.toolkit.BaseConfiguration; |
36 |
36 |
37 /** |
37 /** |
38 * Build list of all the deprecated packages, classes, constructors, fields and methods. |
38 * Build list of all the deprecated packages, classes, constructors, fields and methods. |
39 * |
39 * |
40 * <p><b>This is NOT part of any supported API. |
40 * <p><b>This is NOT part of any supported API. |
47 public class DeprecatedAPIListBuilder { |
47 public class DeprecatedAPIListBuilder { |
48 /** |
48 /** |
49 * List of deprecated type Lists. |
49 * List of deprecated type Lists. |
50 */ |
50 */ |
51 private final Map<DeprElementKind, SortedSet<Element>> deprecatedMap; |
51 private final Map<DeprElementKind, SortedSet<Element>> deprecatedMap; |
52 private final Configuration configuration; |
52 private final BaseConfiguration configuration; |
53 private final Utils utils; |
53 private final Utils utils; |
54 public static enum DeprElementKind { |
54 public static enum DeprElementKind { |
55 REMOVAL, |
55 REMOVAL, |
56 MODULE, |
56 MODULE, |
57 PACKAGE, |
57 PACKAGE, |
70 /** |
70 /** |
71 * Constructor. |
71 * Constructor. |
72 * |
72 * |
73 * @param configuration the current configuration of the doclet |
73 * @param configuration the current configuration of the doclet |
74 */ |
74 */ |
75 public DeprecatedAPIListBuilder(Configuration configuration) { |
75 public DeprecatedAPIListBuilder(BaseConfiguration configuration) { |
76 this.configuration = configuration; |
76 this.configuration = configuration; |
77 this.utils = configuration.utils; |
77 this.utils = configuration.utils; |
78 deprecatedMap = new EnumMap<>(DeprElementKind.class); |
78 deprecatedMap = new EnumMap<>(DeprElementKind.class); |
79 for (DeprElementKind kind : DeprElementKind.values()) { |
79 for (DeprElementKind kind : DeprElementKind.values()) { |
80 deprecatedMap.put(kind, |
80 deprecatedMap.put(kind, |