author | mli |
Wed, 23 May 2018 14:21:14 +0800 | |
changeset 50230 | cae567ae015d |
parent 48840 | 5e2d2067da48 |
permissions | -rw-r--r-- |
10 | 1 |
/* |
48840
5e2d2067da48
8194651: javadoc: mark the com.sun.javadoc API for removal
ksrini
parents:
47216
diff
changeset
|
2 |
* Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved. |
10 | 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 |
|
5520 | 7 |
* published by the Free Software Foundation. Oracle designates this |
10 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5520 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
10 | 10 |
* |
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
5520 | 21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
10 | 24 |
*/ |
25 |
||
26 |
package com.sun.javadoc; |
|
27 |
||
28 |
/** |
|
29 |
* Represents a java program element: class, interface, field, |
|
30 |
* constructor, or method. |
|
31 |
* This is an abstract class dealing with information common to |
|
32 |
* these elements. |
|
33 |
* |
|
34 |
* @see MemberDoc |
|
35 |
* @see ClassDoc |
|
36 |
* |
|
37 |
* @author Robert Field |
|
38617 | 38 |
* |
39 |
* @deprecated |
|
40 |
* The declarations in this package have been superseded by those |
|
41 |
* in the package {@code jdk.javadoc.doclet}. |
|
42 |
* For more information, see the <i>Migration Guide</i> in the documentation for that package. |
|
10 | 43 |
*/ |
48840
5e2d2067da48
8194651: javadoc: mark the com.sun.javadoc API for removal
ksrini
parents:
47216
diff
changeset
|
44 |
@Deprecated(since="9", forRemoval=true) |
5e2d2067da48
8194651: javadoc: mark the com.sun.javadoc API for removal
ksrini
parents:
47216
diff
changeset
|
45 |
@SuppressWarnings("removal") |
10 | 46 |
public interface ProgramElementDoc extends Doc { |
47 |
||
48 |
/** |
|
49 |
* Get the containing class or interface of this program element. |
|
50 |
* |
|
51 |
* @return a ClassDoc for this element's containing class or interface. |
|
52 |
* If this is a top-level class or interface, return null. |
|
53 |
*/ |
|
54 |
ClassDoc containingClass(); |
|
55 |
||
56 |
/** |
|
57 |
* Get the package that this program element is contained in. |
|
58 |
* |
|
59 |
* @return a PackageDoc for this element containing package. |
|
60 |
* If in the unnamed package, this PackageDoc will have the |
|
61 |
* name "". |
|
62 |
*/ |
|
63 |
PackageDoc containingPackage(); |
|
64 |
||
65 |
/** |
|
66 |
* Get the fully qualified name of this program element. |
|
23136
aa8958a4c8f4
8035877: javadoc classes are missing @return and @param tags
jjg
parents:
5520
diff
changeset
|
67 |
* For example, for the class {@code java.util.Hashtable}, |
10 | 68 |
* return "java.util.Hashtable". |
69 |
* <p> |
|
23136
aa8958a4c8f4
8035877: javadoc classes are missing @return and @param tags
jjg
parents:
5520
diff
changeset
|
70 |
* For the method {@code bar()} in class {@code Foo} |
10 | 71 |
* in the unnamed package, return "Foo.bar". |
72 |
* |
|
73 |
* @return the qualified name of the program element as a String. |
|
74 |
*/ |
|
75 |
String qualifiedName(); |
|
76 |
||
77 |
/** |
|
78 |
* Get the modifier specifier integer. |
|
79 |
* |
|
80 |
* @see java.lang.reflect.Modifier |
|
23136
aa8958a4c8f4
8035877: javadoc classes are missing @return and @param tags
jjg
parents:
5520
diff
changeset
|
81 |
* |
aa8958a4c8f4
8035877: javadoc classes are missing @return and @param tags
jjg
parents:
5520
diff
changeset
|
82 |
* @return Get the modifier specifier integer. |
10 | 83 |
*/ |
84 |
int modifierSpecifier(); |
|
85 |
||
86 |
/** |
|
87 |
* Get modifiers string. |
|
88 |
* For example, for: |
|
89 |
* <pre> |
|
90 |
* public abstract int foo() { ... } |
|
91 |
* </pre> |
|
92 |
* return "public abstract". |
|
93 |
* Annotations are not included. |
|
23136
aa8958a4c8f4
8035877: javadoc classes are missing @return and @param tags
jjg
parents:
5520
diff
changeset
|
94 |
* |
aa8958a4c8f4
8035877: javadoc classes are missing @return and @param tags
jjg
parents:
5520
diff
changeset
|
95 |
* @return "public abstract". |
10 | 96 |
*/ |
97 |
String modifiers(); |
|
98 |
||
99 |
/** |
|
100 |
* Get the annotations of this program element. |
|
101 |
* Return an empty array if there are none. |
|
102 |
* |
|
103 |
* @return the annotations of this program element. |
|
104 |
* @since 1.5 |
|
105 |
*/ |
|
106 |
AnnotationDesc[] annotations(); |
|
107 |
||
108 |
/** |
|
109 |
* Return true if this program element is public. |
|
23136
aa8958a4c8f4
8035877: javadoc classes are missing @return and @param tags
jjg
parents:
5520
diff
changeset
|
110 |
* |
aa8958a4c8f4
8035877: javadoc classes are missing @return and @param tags
jjg
parents:
5520
diff
changeset
|
111 |
* @return true if this program element is public. |
10 | 112 |
*/ |
113 |
boolean isPublic(); |
|
114 |
||
115 |
/** |
|
116 |
* Return true if this program element is protected. |
|
23136
aa8958a4c8f4
8035877: javadoc classes are missing @return and @param tags
jjg
parents:
5520
diff
changeset
|
117 |
* |
aa8958a4c8f4
8035877: javadoc classes are missing @return and @param tags
jjg
parents:
5520
diff
changeset
|
118 |
* @return true if this program element is protected. |
10 | 119 |
*/ |
120 |
boolean isProtected(); |
|
121 |
||
122 |
/** |
|
123 |
* Return true if this program element is private. |
|
23136
aa8958a4c8f4
8035877: javadoc classes are missing @return and @param tags
jjg
parents:
5520
diff
changeset
|
124 |
* |
aa8958a4c8f4
8035877: javadoc classes are missing @return and @param tags
jjg
parents:
5520
diff
changeset
|
125 |
* @return true if this program element is private. |
10 | 126 |
*/ |
127 |
boolean isPrivate(); |
|
128 |
||
129 |
/** |
|
130 |
* Return true if this program element is package private. |
|
23136
aa8958a4c8f4
8035877: javadoc classes are missing @return and @param tags
jjg
parents:
5520
diff
changeset
|
131 |
* |
aa8958a4c8f4
8035877: javadoc classes are missing @return and @param tags
jjg
parents:
5520
diff
changeset
|
132 |
* @return true if this program element is package private. |
10 | 133 |
*/ |
134 |
boolean isPackagePrivate(); |
|
135 |
/** |
|
136 |
* Return true if this program element is static. |
|
23136
aa8958a4c8f4
8035877: javadoc classes are missing @return and @param tags
jjg
parents:
5520
diff
changeset
|
137 |
* |
aa8958a4c8f4
8035877: javadoc classes are missing @return and @param tags
jjg
parents:
5520
diff
changeset
|
138 |
* @return true if this program element is static. |
10 | 139 |
*/ |
140 |
boolean isStatic(); |
|
141 |
||
142 |
/** |
|
143 |
* Return true if this program element is final. |
|
23136
aa8958a4c8f4
8035877: javadoc classes are missing @return and @param tags
jjg
parents:
5520
diff
changeset
|
144 |
* |
aa8958a4c8f4
8035877: javadoc classes are missing @return and @param tags
jjg
parents:
5520
diff
changeset
|
145 |
* @return true if this program element is final. |
10 | 146 |
*/ |
147 |
boolean isFinal(); |
|
148 |
} |