0N/A/*
553N/A * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
553N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
553N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
553N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
553N/A * or visit www.oracle.com if you need additional information or have any
553N/A * questions.
0N/A */
0N/A
0N/Apackage com.sun.javadoc;
0N/A
0N/A
0N/A/**
0N/A * Represents a java class or interface and provides access to
0N/A * information about the class, the class's comment and tags, and the
0N/A * members of the class. A ClassDoc only exists if it was
0N/A * processed in this run of javadoc. References to classes
0N/A * which may or may not have been processed in this run are
0N/A * referred to using Type (which can be converted to ClassDoc,
0N/A * if possible).
0N/A *
0N/A * @see Type
0N/A *
0N/A * @since 1.2
0N/A * @author Kaiyang Liu (original)
0N/A * @author Robert Field (rewrite)
0N/A */
0N/Apublic interface ClassDoc extends ProgramElementDoc, Type {
0N/A
0N/A /**
0N/A * Return true if this class is abstract. Return true
0N/A * for all interfaces.
0N/A */
0N/A boolean isAbstract();
0N/A
0N/A /**
0N/A * Return true if this class implements or interface extends
0N/A * <code>java.io.Serializable</code>.
0N/A *
0N/A * Since <code>java.io.Externalizable</code> extends
0N/A * <code>java.io.Serializable</code>,
0N/A * Externalizable objects are also Serializable.
0N/A */
0N/A boolean isSerializable();
0N/A
0N/A /**
0N/A * Return true if this class implements or interface extends
0N/A * <code>java.io.Externalizable</code>.
0N/A */
0N/A boolean isExternalizable();
0N/A
0N/A /**
0N/A * Return the serialization methods for this class or
0N/A * interface.
0N/A *
0N/A * @return an array of MethodDoc objects that represents
0N/A * the serialization methods for this class or interface.
0N/A */
0N/A MethodDoc[] serializationMethods();
0N/A
0N/A /**
0N/A * Return the Serializable fields of this class or interface.
0N/A * <p>
0N/A * Return either a list of default fields documented by
0N/A * <code>serial</code> tag<br>
0N/A * or return a single <code>FieldDoc</code> for
0N/A * <code>serialPersistentField</code> member.
0N/A * There should be a <code>serialField</code> tag for
0N/A * each Serializable field defined by an <code>ObjectStreamField</code>
0N/A * array component of <code>serialPersistentField</code>.
0N/A *
0N/A * @return an array of <code>FieldDoc</code> objects for the Serializable
0N/A * fields of this class or interface.
0N/A *
0N/A * @see #definesSerializableFields()
0N/A * @see SerialFieldTag
0N/A */
0N/A FieldDoc[] serializableFields();
0N/A
0N/A /**
0N/A * Return true if Serializable fields are explicitly defined with
0N/A * the special class member <code>serialPersistentFields</code>.
0N/A *
0N/A * @see #serializableFields()
0N/A * @see SerialFieldTag
0N/A */
0N/A boolean definesSerializableFields();
0N/A
0N/A /**
0N/A * Return the superclass of this class. Return null if this is an
0N/A * interface.
0N/A *
0N/A * <p> <i>This method cannot accommodate certain generic type constructs.
0N/A * The <code>superclassType</code> method should be used instead.</i>
0N/A *
0N/A * @return the ClassDoc for the superclass of this class, null if
0N/A * there is no superclass.
0N/A * @see #superclassType
0N/A */
0N/A ClassDoc superclass();
0N/A
0N/A /**
0N/A * Return the superclass of this class. Return null if this is an
0N/A * interface. A superclass is represented by either a
0N/A * <code>ClassDoc</code> or a <code>ParametrizedType</code>.
0N/A *
0N/A * @return the superclass of this class, or null if there is no superclass.
0N/A * @since 1.5
0N/A */
0N/A Type superclassType();
0N/A
0N/A /**
0N/A * Test whether this class is a subclass of the specified class.
0N/A * If this is an interface, return false for all classes except
0N/A * <code>java.lang.Object</code> (we must keep this unexpected
0N/A * behavior for compatibility reasons).
0N/A *
0N/A * @param cd the candidate superclass.
0N/A * @return true if cd is a superclass of this class.
0N/A */
0N/A boolean subclassOf(ClassDoc cd);
0N/A
0N/A /**
0N/A * Return interfaces implemented by this class or interfaces extended
0N/A * by this interface. Includes only directly-declared interfaces, not
0N/A * inherited interfaces.
0N/A * Return an empty array if there are no interfaces.
0N/A *
0N/A * <p> <i>This method cannot accommodate certain generic type constructs.
0N/A * The <code>interfaceTypes</code> method should be used instead.</i>
0N/A *
0N/A * @return an array of ClassDoc objects representing the interfaces.
0N/A * @see #interfaceTypes
0N/A */
0N/A ClassDoc[] interfaces();
0N/A
0N/A /**
0N/A * Return interfaces implemented by this class or interfaces extended
0N/A * by this interface. Includes only directly-declared interfaces, not
0N/A * inherited interfaces.
0N/A * Return an empty array if there are no interfaces.
0N/A *
0N/A * @return an array of interfaces, each represented by a
0N/A * <code>ClassDoc</code> or a <code>ParametrizedType</code>.
0N/A * @since 1.5
0N/A */
0N/A Type[] interfaceTypes();
0N/A
0N/A /**
0N/A * Return the formal type parameters of this class or interface.
0N/A * Return an empty array if there are none.
0N/A *
0N/A * @return the formal type parameters of this class or interface.
0N/A * @since 1.5
0N/A */
0N/A TypeVariable[] typeParameters();
0N/A
0N/A /**
0N/A * Return the type parameter tags of this class or interface.
0N/A * Return an empty array if there are none.
0N/A *
0N/A * @return the type parameter tags of this class or interface.
0N/A * @since 1.5
0N/A */
0N/A ParamTag[] typeParamTags();
0N/A
0N/A /**
0N/A * Return
0N/A * <a href="{@docRoot}/com/sun/javadoc/package-summary.html#included">included</a>
0N/A * fields in this class or interface.
0N/A * Excludes enum constants if this is an enum type.
0N/A *
0N/A * @return an array of FieldDoc objects representing the included
0N/A * fields in this class or interface.
0N/A */
0N/A FieldDoc[] fields();
0N/A
0N/A /**
0N/A * Return fields in this class or interface, filtered to the specified
0N/A * <a href="{@docRoot}/com/sun/javadoc/package-summary.html#included">access
0N/A * modifier option</a>.
0N/A * Excludes enum constants if this is an enum type.
0N/A *
0N/A * @param filter Specify true to filter according to the specified access
0N/A * modifier option.
0N/A * Specify false to include all fields regardless of
0N/A * access modifier option.
0N/A * @return an array of FieldDoc objects representing the included
0N/A * fields in this class or interface.
0N/A */
0N/A FieldDoc[] fields(boolean filter);
0N/A
0N/A /**
0N/A * Return the enum constants if this is an enum type.
0N/A * Return an empty array if there are no enum constants, or if
0N/A * this is not an enum type.
0N/A *
0N/A * @return the enum constants if this is an enum type.
0N/A */
0N/A FieldDoc[] enumConstants();
0N/A
0N/A /**
0N/A * Return
0N/A * <a href="{@docRoot}/com/sun/javadoc/package-summary.html#included">included</a>
0N/A * methods in this class or interface.
0N/A * Same as <code>methods(true)</code>.
0N/A *
0N/A * @return an array of MethodDoc objects representing the included
0N/A * methods in this class or interface. Does not include
0N/A * constructors or annotation type elements.
0N/A */
0N/A MethodDoc[] methods();
0N/A
0N/A /**
0N/A * Return methods in this class or interface, filtered to the specified
0N/A * <a href="{@docRoot}/com/sun/javadoc/package-summary.html#included">access
0N/A * modifier option</a>. Does not include constructors or annotation
0N/A * type elements.
0N/A *
0N/A * @param filter Specify true to filter according to the specified access
0N/A * modifier option.
0N/A * Specify false to include all methods regardless of
0N/A * access modifier option.
0N/A * @return an array of MethodDoc objects representing the included
0N/A * methods in this class or interface.
0N/A */
0N/A MethodDoc[] methods(boolean filter);
0N/A
0N/A /**
0N/A * Return
0N/A * <a href="{@docRoot}/com/sun/javadoc/package-summary.html#included">included</a>
0N/A * constructors in this class. An array containing the default
0N/A * no-arg constructor is returned if no other constructors exist.
0N/A * Return empty array if this is an interface.
0N/A *
0N/A * @return an array of ConstructorDoc objects representing the included
0N/A * constructors in this class.
0N/A */
0N/A ConstructorDoc[] constructors();
0N/A
0N/A /**
0N/A * Return constructors in this class, filtered to the specified
0N/A * <a href="{@docRoot}/com/sun/javadoc/package-summary.html#included">access
0N/A * modifier option</a>. Return an array containing the default
0N/A * no-arg constructor if no other constructors exist.
0N/A *
0N/A * @param filter Specify true to filter according to the specified access
0N/A * modifier option.
0N/A * Specify false to include all constructors regardless of
0N/A * access modifier option.
0N/A * @return an array of ConstructorDoc objects representing the included
0N/A * constructors in this class.
0N/A */
0N/A ConstructorDoc[] constructors(boolean filter);
0N/A
0N/A
0N/A /**
0N/A * Return
0N/A * <a href="{@docRoot}/com/sun/javadoc/package-summary.html#included">included</a>
0N/A * nested classes and interfaces within this class or interface.
0N/A * This includes both static and non-static nested classes.
0N/A * (This method should have been named <code>nestedClasses()</code>,
0N/A * as inner classes are technically non-static.) Anonymous and local classes
0N/A * or interfaces are not included.
0N/A *
0N/A * @return an array of ClassDoc objects representing the included classes
0N/A * and interfaces defined in this class or interface.
0N/A */
0N/A ClassDoc[] innerClasses();
0N/A
0N/A /**
0N/A * Return nested classes and interfaces within this class or interface
0N/A * filtered to the specified
0N/A * <a href="{@docRoot}/com/sun/javadoc/package-summary.html#included">access
0N/A * modifier option</a>.
0N/A * This includes both static and non-static nested classes.
0N/A * Anonymous and local classes are not included.
0N/A *
0N/A * @param filter Specify true to filter according to the specified access
0N/A * modifier option.
0N/A * Specify false to include all nested classes regardless of
0N/A * access modifier option.
0N/A * @return a filtered array of ClassDoc objects representing the included
0N/A * classes and interfaces defined in this class or interface.
0N/A */
0N/A ClassDoc[] innerClasses(boolean filter);
0N/A
0N/A /**
0N/A * Find the specified class or interface within the context of this class doc.
0N/A * Search order: 1) qualified name, 2) nested in this class or interface,
0N/A * 3) in this package, 4) in the class imports, 5) in the package imports.
0N/A * Return the ClassDoc if found, null if not found.
0N/A */
0N/A ClassDoc findClass(String className);
0N/A
0N/A /**
0N/A * Get the list of classes and interfaces declared as imported.
971N/A * These are called "single-type-import declarations" in
971N/A * <cite>The Java&trade; Language Specification</cite>.
0N/A *
0N/A * @return an array of ClassDoc representing the imported classes.
0N/A *
0N/A * @deprecated Import declarations are implementation details that
0N/A * should not be exposed here. In addition, not all imported
0N/A * classes are imported through single-type-import declarations.
0N/A */
0N/A @Deprecated
0N/A ClassDoc[] importedClasses();
0N/A
0N/A /**
0N/A * Get the list of packages declared as imported.
971N/A * These are called "type-import-on-demand declarations" in
971N/A * <cite>The Java&trade; Language Specification</cite>.
0N/A *
0N/A * @return an array of PackageDoc representing the imported packages.
0N/A *
0N/A * @deprecated Import declarations are implementation details that
0N/A * should not be exposed here. In addition, this method's
0N/A * return type does not allow for all type-import-on-demand
0N/A * declarations to be returned.
0N/A */
0N/A @Deprecated
0N/A PackageDoc[] importedPackages();
0N/A}