Path: blob/aarch64-shenandoah-jdk8u272-b10/langtools/src/share/classes/com/sun/javadoc/MethodDoc.java
38890 views
/*1* Copyright (c) 1998, 2012, 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 method of a java class.29*30* @since 1.231* @author Robert Field32*/33public interface MethodDoc extends ExecutableMemberDoc {3435/**36* Return true if this method is abstract37*/38boolean isAbstract();3940/**41* Return true if this method is default42*/43boolean isDefault();4445/**46* Get return type.47*48* @return the return type of this method, null if it49* is a constructor.50*/51Type returnType();5253/**54* Return the class containing the method that this method overrides.55*56* <p> <i>The <code>overriddenClass</code> method cannot57* accommodate certain generic type constructs. The58* <code>overriddenType</code> method should be used instead.</i>59*60* @return a ClassDoc representing the superclass61* defining a method that this method overrides, or null if62* this method does not override.63*/64ClassDoc overriddenClass();6566/**67* Return the type containing the method that this method overrides.68* It may be a <code>ClassDoc</code> or a <code>ParameterizedType</code>.69*70* @return the supertype whose method is overridden, or null if this71* method does not override another in a superclass72* @since 1.573*/74Type overriddenType();7576/**77* Return the method that this method overrides.78*79* @return a MethodDoc representing a method definition80* in a superclass this method overrides, null if81* this method does not override.82*/83MethodDoc overriddenMethod();8485/**86* Tests whether this method overrides another.87* The overridden method may be one declared in a superclass or88* a superinterface (unlike {@link #overriddenMethod()}).89*90* <p> When a non-abstract method overrides an abstract one, it is91* also said to <i>implement</i> the other.92*93* @param meth the other method to examine94* @return <tt>true</tt> if this method overrides the other95* @since 1.596*/97boolean overrides(MethodDoc meth);98}99100101