Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openjdk-multiarch-jdk8u
Path: blob/aarch64-shenandoah-jdk8u272-b10/langtools/src/share/classes/com/sun/javadoc/ProgramElementDoc.java
38890 views
1
/*
2
* Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
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. Oracle designates this
8
* particular file as subject to the "Classpath" exception as provided
9
* by Oracle in the LICENSE file that accompanied this code.
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
*
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.
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
38
*/
39
public interface ProgramElementDoc extends Doc {
40
41
/**
42
* Get the containing class or interface of this program element.
43
*
44
* @return a ClassDoc for this element's containing class or interface.
45
* If this is a top-level class or interface, return null.
46
*/
47
ClassDoc containingClass();
48
49
/**
50
* Get the package that this program element is contained in.
51
*
52
* @return a PackageDoc for this element containing package.
53
* If in the unnamed package, this PackageDoc will have the
54
* name "".
55
*/
56
PackageDoc containingPackage();
57
58
/**
59
* Get the fully qualified name of this program element.
60
* For example, for the class <code>java.util.Hashtable</code>,
61
* return "java.util.Hashtable".
62
* <p>
63
* For the method <code>bar()</code> in class <code>Foo</code>
64
* in the unnamed package, return "Foo.bar".
65
*
66
* @return the qualified name of the program element as a String.
67
*/
68
String qualifiedName();
69
70
/**
71
* Get the modifier specifier integer.
72
*
73
* @see java.lang.reflect.Modifier
74
*/
75
int modifierSpecifier();
76
77
/**
78
* Get modifiers string.
79
* For example, for:
80
* <pre>
81
* public abstract int foo() { ... }
82
* </pre>
83
* return "public abstract".
84
* Annotations are not included.
85
*/
86
String modifiers();
87
88
/**
89
* Get the annotations of this program element.
90
* Return an empty array if there are none.
91
*
92
* @return the annotations of this program element.
93
* @since 1.5
94
*/
95
AnnotationDesc[] annotations();
96
97
/**
98
* Return true if this program element is public.
99
*/
100
boolean isPublic();
101
102
/**
103
* Return true if this program element is protected.
104
*/
105
boolean isProtected();
106
107
/**
108
* Return true if this program element is private.
109
*/
110
boolean isPrivate();
111
112
/**
113
* Return true if this program element is package private.
114
*/
115
boolean isPackagePrivate();
116
/**
117
* Return true if this program element is static.
118
*/
119
boolean isStatic();
120
121
/**
122
* Return true if this program element is final.
123
*/
124
boolean isFinal();
125
}
126
127