src/share/classes/com/sun/javadoc/ProgramElementDoc.java

changeset 0
959103a6100f
child 2525
2eb010b6cb22
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/share/classes/com/sun/javadoc/ProgramElementDoc.java	Wed Apr 27 01:34:52 2016 +0800
     1.3 @@ -0,0 +1,125 @@
     1.4 +/*
     1.5 + * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
     1.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.7 + *
     1.8 + * This code is free software; you can redistribute it and/or modify it
     1.9 + * under the terms of the GNU General Public License version 2 only, as
    1.10 + * published by the Free Software Foundation.  Oracle designates this
    1.11 + * particular file as subject to the "Classpath" exception as provided
    1.12 + * by Oracle in the LICENSE file that accompanied this code.
    1.13 + *
    1.14 + * This code is distributed in the hope that it will be useful, but WITHOUT
    1.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    1.16 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    1.17 + * version 2 for more details (a copy is included in the LICENSE file that
    1.18 + * accompanied this code).
    1.19 + *
    1.20 + * You should have received a copy of the GNU General Public License version
    1.21 + * 2 along with this work; if not, write to the Free Software Foundation,
    1.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1.23 + *
    1.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    1.25 + * or visit www.oracle.com if you need additional information or have any
    1.26 + * questions.
    1.27 + */
    1.28 +
    1.29 +package com.sun.javadoc;
    1.30 +
    1.31 +/**
    1.32 + * Represents a java program element: class, interface, field,
    1.33 + * constructor, or method.
    1.34 + * This is an abstract class dealing with information common to
    1.35 + * these elements.
    1.36 + *
    1.37 + * @see MemberDoc
    1.38 + * @see ClassDoc
    1.39 + *
    1.40 + * @author Robert Field
    1.41 + */
    1.42 +public interface ProgramElementDoc extends Doc {
    1.43 +
    1.44 +    /**
    1.45 +     * Get the containing class or interface of this program element.
    1.46 +     *
    1.47 +     * @return a ClassDoc for this element's containing class or interface.
    1.48 +     * If this is a top-level class or interface, return null.
    1.49 +     */
    1.50 +    ClassDoc containingClass();
    1.51 +
    1.52 +    /**
    1.53 +     * Get the package that this program element is contained in.
    1.54 +     *
    1.55 +     * @return a PackageDoc for this element containing package.
    1.56 +     * If in the unnamed package, this PackageDoc will have the
    1.57 +     * name "".
    1.58 +     */
    1.59 +    PackageDoc containingPackage();
    1.60 +
    1.61 +    /**
    1.62 +     * Get the fully qualified name of this program element.
    1.63 +     * For example, for the class <code>java.util.Hashtable</code>,
    1.64 +     * return "java.util.Hashtable".
    1.65 +     * <p>
    1.66 +     * For the method <code>bar()</code> in class <code>Foo</code>
    1.67 +     * in the unnamed package, return "Foo.bar".
    1.68 +     *
    1.69 +     * @return the qualified name of the program element as a String.
    1.70 +     */
    1.71 +    String qualifiedName();
    1.72 +
    1.73 +    /**
    1.74 +     * Get the modifier specifier integer.
    1.75 +     *
    1.76 +     * @see java.lang.reflect.Modifier
    1.77 +     */
    1.78 +    int modifierSpecifier();
    1.79 +
    1.80 +    /**
    1.81 +     * Get modifiers string.
    1.82 +     * For example, for:
    1.83 +     * <pre>
    1.84 +     *   public abstract int foo() { ... }
    1.85 +     * </pre>
    1.86 +     * return "public abstract".
    1.87 +     * Annotations are not included.
    1.88 +     */
    1.89 +    String modifiers();
    1.90 +
    1.91 +    /**
    1.92 +     * Get the annotations of this program element.
    1.93 +     * Return an empty array if there are none.
    1.94 +     *
    1.95 +     * @return the annotations of this program element.
    1.96 +     * @since 1.5
    1.97 +     */
    1.98 +    AnnotationDesc[] annotations();
    1.99 +
   1.100 +    /**
   1.101 +     * Return true if this program element is public.
   1.102 +     */
   1.103 +    boolean isPublic();
   1.104 +
   1.105 +    /**
   1.106 +     * Return true if this program element is protected.
   1.107 +     */
   1.108 +    boolean isProtected();
   1.109 +
   1.110 +    /**
   1.111 +     * Return true if this program element is private.
   1.112 +     */
   1.113 +    boolean isPrivate();
   1.114 +
   1.115 +    /**
   1.116 +     * Return true if this program element is package private.
   1.117 +     */
   1.118 +    boolean isPackagePrivate();
   1.119 +    /**
   1.120 +     * Return true if this program element is static.
   1.121 +     */
   1.122 +    boolean isStatic();
   1.123 +
   1.124 +    /**
   1.125 +     * Return true if this program element is final.
   1.126 +     */
   1.127 +    boolean isFinal();
   1.128 +}

mercurial