duke@1: /* duke@1: * Copyright 1998-2006 Sun Microsystems, Inc. All Rights Reserved. duke@1: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. duke@1: * duke@1: * This code is free software; you can redistribute it and/or modify it duke@1: * under the terms of the GNU General Public License version 2 only, as duke@1: * published by the Free Software Foundation. Sun designates this duke@1: * particular file as subject to the "Classpath" exception as provided duke@1: * by Sun in the LICENSE file that accompanied this code. duke@1: * duke@1: * This code is distributed in the hope that it will be useful, but WITHOUT duke@1: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or duke@1: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License duke@1: * version 2 for more details (a copy is included in the LICENSE file that duke@1: * accompanied this code). duke@1: * duke@1: * You should have received a copy of the GNU General Public License version duke@1: * 2 along with this work; if not, write to the Free Software Foundation, duke@1: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. duke@1: * duke@1: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, duke@1: * CA 95054 USA or visit www.sun.com if you need additional information or duke@1: * have any questions. duke@1: */ duke@1: duke@1: package com.sun.javadoc; duke@1: duke@1: /** duke@1: * Represents a method of a java class. duke@1: * duke@1: * @since 1.2 duke@1: * @author Robert Field duke@1: */ duke@1: public interface MethodDoc extends ExecutableMemberDoc { duke@1: duke@1: /** duke@1: * Return true if this method is abstract duke@1: */ duke@1: boolean isAbstract(); duke@1: duke@1: /** duke@1: * Get return type. duke@1: * duke@1: * @return the return type of this method, null if it duke@1: * is a constructor. duke@1: */ duke@1: Type returnType(); duke@1: duke@1: /** duke@1: * Return the class containing the method that this method overrides. duke@1: * duke@1: *

The overriddenClass method cannot duke@1: * accommodate certain generic type constructs. The duke@1: * overriddenType method should be used instead. duke@1: * duke@1: * @return a ClassDoc representing the superclass duke@1: * defining a method that this method overrides, or null if duke@1: * this method does not override. duke@1: */ duke@1: ClassDoc overriddenClass(); duke@1: duke@1: /** duke@1: * Return the type containing the method that this method overrides. duke@1: * It may be a ClassDoc or a ParameterizedType. duke@1: * duke@1: * @return the supertype whose method is overridden, or null if this duke@1: * method does not override another in a superclass duke@1: * @since 1.5 duke@1: */ duke@1: Type overriddenType(); duke@1: duke@1: /** duke@1: * Return the method that this method overrides. duke@1: * duke@1: * @return a MethodDoc representing a method definition duke@1: * in a superclass this method overrides, null if duke@1: * this method does not override. duke@1: */ duke@1: MethodDoc overriddenMethod(); duke@1: duke@1: /** duke@1: * Tests whether this method overrides another. duke@1: * The overridden method may be one declared in a superclass or duke@1: * a superinterface (unlike {@link #overriddenMethod()}). duke@1: * duke@1: *

When a non-abstract method overrides an abstract one, it is duke@1: * also said to implement the other. duke@1: * duke@1: * @param meth the other method to examine duke@1: * @return true if this method overrides the other duke@1: * @since 1.5 duke@1: */ duke@1: boolean overrides(MethodDoc meth); duke@1: }