author | phh |
Sat, 30 Nov 2019 14:33:05 -0800 | |
changeset 59330 | 5b96c12f909d |
parent 47216 | 71c04702a3d5 |
permissions | -rw-r--r-- |
43302
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
1 |
/* |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
2 |
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
4 |
* |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. Oracle designates this |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
8 |
* particular file as subject to the "Classpath" exception as provided |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
9 |
* by Oracle in the LICENSE file that accompanied this code. |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
10 |
* |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
15 |
* accompanied this code). |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
16 |
* |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
17 |
* You should have received a copy of the GNU General Public License version |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
20 |
* |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
22 |
* or visit www.oracle.com if you need additional information or have any |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
23 |
* questions. |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
24 |
*/ |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
25 |
|
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
26 |
package build.tools.taglet; |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
27 |
|
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
28 |
import java.util.EnumSet; |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
29 |
import java.util.List; |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
30 |
import java.util.Set; |
44361 | 31 |
import javax.lang.model.element.Element; |
43302
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
32 |
import com.sun.source.doctree.DocTree; |
44123 | 33 |
import jdk.javadoc.doclet.Taglet; |
34 |
import static jdk.javadoc.doclet.Taglet.Location.*; |
|
43302
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
35 |
|
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
36 |
/** |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
37 |
* An inline tag to conveniently insert a standard Incubating warning. For |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
38 |
* use by members in Incubator Modules. |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
39 |
*/ |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
40 |
public class Incubating implements Taglet { |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
41 |
|
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
42 |
/** Returns the set of locations in which a taglet may be used. */ |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
43 |
@Override |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
44 |
public Set<Location> getAllowedLocations() { |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
45 |
return EnumSet.of(OVERVIEW, MODULE, PACKAGE, TYPE); |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
46 |
} |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
47 |
|
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
48 |
@Override |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
49 |
public boolean isInlineTag() { |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
50 |
return true; |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
51 |
} |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
52 |
|
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
53 |
@Override |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
54 |
public String getName() { |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
55 |
return "Incubating"; |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
56 |
} |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
57 |
|
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
58 |
private static final String MESSAGE = |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
59 |
"<BR><b><a href=\"http://openjdk.java.net/jeps/11\">Incubating Feature.</a>" |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
60 |
+ " Will be removed in a future release.</b>"; |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
61 |
|
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
62 |
@Override |
44361 | 63 |
public String toString(List<? extends DocTree> tags, Element elem) { |
43302
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
64 |
return MESSAGE; |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
65 |
} |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
66 |
} |
45de1dc92ecd
8173354: javadoc warning notice for types in Incubator Modules
chegar
parents:
diff
changeset
|
67 |