站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JDK 5 Documentation v6.0, Java 2 SDK 英文文档

MethodDoc (Doclet API) - JDK 5 Documentation v6.0, Java 2 SDK 英文文档


Doclet API

com.sun.javadoc
Interface MethodDoc

All Superinterfaces:
Comparable<Object>, Doc, ExecutableMemberDoc, MemberDoc, ProgramElementDoc
All Known Subinterfaces:
AnnotationTypeElementDoc

public interface MethodDoc
extends ExecutableMemberDoc

Represents a method of a java class.

Since:
1.2

Method Summary
 boolean isAbstract()
          Return true if this method is abstract
 ClassDoc overriddenClass()
          Return the class containing the method that this method overrides.
 MethodDoc overriddenMethod()
          Return the method that this method overrides.
 Type overriddenType()
          Return the type containing the method that this method overrides.
 boolean overrides(MethodDoc meth)
          Tests whether this method overrides another.
 Type returnType()
          Get return type.
 
Methods inherited from interface com.sun.javadoc.ExecutableMemberDoc
flatSignature, isNative, isSynchronized, isVarArgs, parameters, paramTags, signature, thrownExceptions, thrownExceptionTypes, throwsTags, typeParameters, typeParamTags
 
Methods inherited from interface com.sun.javadoc.MemberDoc
isSynthetic
 
Methods inherited from interface com.sun.javadoc.ProgramElementDoc
annotations, containingClass, containingPackage, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, modifiers, modifierSpecifier, qualifiedName
 
Methods inherited from interface com.sun.javadoc.Doc
commentText, compareTo, firstSentenceTags, getRawCommentText, inlineTags, isAnnotationType, isAnnotationTypeElement, isClass, isConstructor, isEnum, isEnumConstant, isError, isException, isField, isIncluded, isInterface, isMethod, isOrdinaryClass, name, position, seeTags, setRawCommentText, tags, tags
 

Method Detail

isAbstract

boolean isAbstract()
Return true if this method is abstract


returnType

Type returnType()
Get return type.

Returns:
the return type of this method, null if it is a constructor.

overriddenClass

ClassDoc overriddenClass()
Return the class containing the method that this method overrides.

The overriddenClass method cannot accommodate certain generic type constructs. The overriddenType method should be used instead.

Returns:
a ClassDoc representing the superclass defining a method that this method overrides, or null if this method does not override.

overriddenType

Type overriddenType()
Return the type containing the method that this method overrides. It may be a ClassDoc or a ParameterizedType.

Returns:
the supertype whose method is overridden, or null if this method does not override another in a superclass
Since:
1.5

overriddenMethod

MethodDoc overriddenMethod()
Return the method that this method overrides.

Returns:
a MethodDoc representing a method definition in a superclass this method overrides, null if this method does not override.

overrides

boolean overrides(MethodDoc meth)
Tests whether this method overrides another. The overridden method may be one declared in a superclass or a superinterface (unlike overriddenMethod()).

When a non-abstract method overrides an abstract one, it is also said to implement the other.

Parameters:
meth - the other method to examine
Returns:
true if this method overrides the other
Since:
1.5

Doclet API

Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2006 Sun Microsystems, Inc. 4150 Network Circle
Santa Clara, California, 95054, U.S.A. All Rights Reserved.