Path: blob/aarch64-shenandoah-jdk8u272-b10/langtools/src/share/classes/com/sun/javadoc/ProgramElementDoc.java
38890 views
/*1* Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package com.sun.javadoc;2627/**28* Represents a java program element: class, interface, field,29* constructor, or method.30* This is an abstract class dealing with information common to31* these elements.32*33* @see MemberDoc34* @see ClassDoc35*36* @author Robert Field37*/38public interface ProgramElementDoc extends Doc {3940/**41* Get the containing class or interface of this program element.42*43* @return a ClassDoc for this element's containing class or interface.44* If this is a top-level class or interface, return null.45*/46ClassDoc containingClass();4748/**49* Get the package that this program element is contained in.50*51* @return a PackageDoc for this element containing package.52* If in the unnamed package, this PackageDoc will have the53* name "".54*/55PackageDoc containingPackage();5657/**58* Get the fully qualified name of this program element.59* For example, for the class <code>java.util.Hashtable</code>,60* return "java.util.Hashtable".61* <p>62* For the method <code>bar()</code> in class <code>Foo</code>63* in the unnamed package, return "Foo.bar".64*65* @return the qualified name of the program element as a String.66*/67String qualifiedName();6869/**70* Get the modifier specifier integer.71*72* @see java.lang.reflect.Modifier73*/74int modifierSpecifier();7576/**77* Get modifiers string.78* For example, for:79* <pre>80* public abstract int foo() { ... }81* </pre>82* return "public abstract".83* Annotations are not included.84*/85String modifiers();8687/**88* Get the annotations of this program element.89* Return an empty array if there are none.90*91* @return the annotations of this program element.92* @since 1.593*/94AnnotationDesc[] annotations();9596/**97* Return true if this program element is public.98*/99boolean isPublic();100101/**102* Return true if this program element is protected.103*/104boolean isProtected();105106/**107* Return true if this program element is private.108*/109boolean isPrivate();110111/**112* Return true if this program element is package private.113*/114boolean isPackagePrivate();115/**116* Return true if this program element is static.117*/118boolean isStatic();119120/**121* Return true if this program element is final.122*/123boolean isFinal();124}125126127