author | jjg |
Thu, 23 Mar 2017 10:58:16 -0700 | |
changeset 44388 | 4d0903f1f311 |
parent 44189 | dd311cfb920b |
permissions | -rw-r--r-- |
19910 | 1 |
/* |
44388 | 2 |
* Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. |
19910 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
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 |
|
7 |
* published by the Free Software Foundation. |
|
8 |
* |
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License version |
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
* |
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
20 |
* or visit www.oracle.com if you need additional information or have any |
|
21 |
* questions. |
|
22 |
*/ |
|
23 |
||
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
21478
diff
changeset
|
24 |
import java.util.EnumSet; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
21478
diff
changeset
|
25 |
import java.util.List; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
21478
diff
changeset
|
26 |
import java.util.Set; |
44388 | 27 |
import javax.lang.model.element.Element; |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
21478
diff
changeset
|
28 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
21478
diff
changeset
|
29 |
import com.sun.source.doctree.DocTree; |
44189 | 30 |
import jdk.javadoc.doclet.Taglet; |
19910 | 31 |
|
32 |
public class Check implements Taglet { |
|
33 |
||
34 |
private static final String TAG_NAME = "check"; |
|
35 |
||
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
21478
diff
changeset
|
36 |
private final EnumSet<Location> allowedSet = EnumSet.allOf(Location.class); |
19910 | 37 |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
21478
diff
changeset
|
38 |
@Override |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
21478
diff
changeset
|
39 |
public Set<Taglet.Location> getAllowedLocations() { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
21478
diff
changeset
|
40 |
return allowedSet; |
19910 | 41 |
} |
42 |
||
43 |
/** |
|
44 |
* Return false since the tag is not an inline tag. |
|
45 |
* |
|
46 |
* @return false since the tag is not an inline tag. |
|
47 |
*/ |
|
44189 | 48 |
@Override |
19910 | 49 |
public boolean isInlineTag() { |
50 |
return false; |
|
51 |
} |
|
52 |
||
53 |
/** |
|
54 |
* Return the name of this custom tag. |
|
55 |
* |
|
56 |
* @return the name of this tag. |
|
57 |
*/ |
|
44189 | 58 |
@Override |
19910 | 59 |
public String getName() { |
60 |
return TAG_NAME; |
|
61 |
} |
|
62 |
||
63 |
/** |
|
44189 | 64 |
* Given a list of DocTrees representing this custom tag, return its string |
19910 | 65 |
* representation. |
66 |
* |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
21478
diff
changeset
|
67 |
* @param tags the array of tags representing this custom tag. |
44388 | 68 |
* @param element the declaration to which the enclosing comment belongs |
19910 | 69 |
* @return null to test if the javadoc throws an exception or not. |
70 |
*/ |
|
44189 | 71 |
@Override |
44388 | 72 |
public String toString(List<? extends DocTree> tags, Element element) { |
19910 | 73 |
return null; |
74 |
} |
|
75 |
} |