KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > javadoc > MethodDoc


1 /*
2  * @(#)MethodDoc.java 1.11 04/05/20
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package com.sun.javadoc;
9
10 /**
11  * Represents a method of a java class.
12  *
13  * @since JDK1.2
14  * @author Robert Field
15  */

16 public interface MethodDoc extends ExecutableMemberDoc {
17
18     /**
19      * Return true if this method is abstract
20      */

21     boolean isAbstract();
22
23     /**
24      * Get return type.
25      *
26      * @return the return type of this method, null if it
27      * is a constructor.
28      */

29     Type returnType();
30
31     /**
32      * Return the class containing the method that this method overrides.
33      *
34      * <p> <i>The <code>overriddenClass</code> method cannot
35      * accommodate certain generic type constructs. The
36      * <code>overriddenType</code> method should be used instead.</i>
37      *
38      * @return a ClassDoc representing the superclass
39      * defining a method that this method overrides, or null if
40      * this method does not override.
41      */

42     ClassDoc overriddenClass();
43
44     /**
45      * Return the type containing the method that this method overrides.
46      * It may be a <code>ClassDoc</code> or a <code>ParameterizedType</code>.
47      *
48      * @return the supertype whose method is overridden, or null if this
49      * method does not override another in a superclass
50      * @since 1.5
51      */

52     Type overriddenType();
53
54     /**
55      * Return the method that this method overrides.
56      *
57      * @return a MethodDoc representing a method definition
58      * in a superclass this method overrides, null if
59      * this method does not override.
60      */

61     MethodDoc overriddenMethod();
62
63     /**
64      * Tests whether this method overrides another.
65      * The overridden method may be one declared in a superclass or
66      * a superinterface (unlike {@link #overriddenMethod()}).
67      *
68      * <p> When a non-abstract method overrides an abstract one, it is
69      * also said to <i>implement</i> the other.
70      *
71      * @param meth the other method to examine
72      * @return <tt>true</tt> if this method overrides the other
73      * @since 1.5
74      */

75     boolean overrides(MethodDoc meth);
76 }
77
78
Popular Tags