Package: org.codehaus.groovy.tools.groovydoc

## [Java] Class SimpleGroovyMethodDoc

- org.codehaus.groovy.tools.groovydoc.SimpleGroovyMethodDoc

- All Implemented Interfaces and Traits:
    GroovyMethodDoc

      public class SimpleGroovyMethodDoc
      extends SimpleGroovyExecutableMemberDoc
      implements GroovyMethodDoc

  Default GroovyMethodDoc implementation.

- - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class SimpleGroovyMemberDoc` | `belongsToClass`
    `class SimpleGroovyDoc` | `ANNOTATION_DEF, CLASS_DEF, ENUM_DEF, INTERFACE_DEF, RECORD_DEF, TRAIT_DEF`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `SimpleGroovyMethodDoc(String name, GroovyClassDoc belongsToClass)` Creates a documented method owned by the supplied class.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public GroovyClassDoc` | `overriddenClass()` * Returns the class in which the overridden method is declared. * * Returns: the overridden method's declaring class, or `null` if none exists
    `` | `public GroovyMethodDoc` | `overriddenMethod()` * Returns the method that this method overrides. * * Returns: the overridden method, or `null` if none exists
    `` | `public GroovyType` | `overriddenType()` * Returns the type that declares the method overridden by this method. * * Returns: the overridden type, or `null` if none exists
    `` | `public boolean` | `overrides(GroovyMethodDoc arg0)` * Indicates whether this method overrides the supplied method. * * Parameters: `arg0` - the candidate method * Returns: `true` if this method overrides `arg0`
    `` | `public GroovyType` | `returnType()` * Returns the declared return type of this method. * * Returns: the return type
    `` | `public void` | `setReturnType(GroovyType returnType)` * Updates the declared return type of this method. * * Parameters: `o` - the return type to associate with this method
    `` | `public void` | `setTypeParameters(String typeParameters)` Stores the rendered type parameters for this method.
    `` | `public String` | `typeParameters()` Returns the rendered type parameters for this method.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class SimpleGroovyExecutableMemberDoc` | `add, flatSignature, isNative, isSynchronized, isVarArgs, parameters, signature, thrownExceptionTypes, thrownExceptions`
    `class SimpleGroovyMemberDoc` | `commentText, firstSentenceCommentText, isSynthetic`
    `class SimpleGroovyAbstractableElementDoc` | `isAbstract, setAbstract`
    `class SimpleGroovyProgramElementDoc` | `addAnnotationRef, annotations, containingClass, containingPackage, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, modifierSpecifier, modifiers, qualifiedName, setContainingPackage, setFinal, setPackagePrivate, setPrivate, setProtected, setPublic, setStatic`
    `class SimpleGroovyDoc` | `calculateFirstSentence, commentText, compareTo, firstSentenceCommentText, getRawCommentText, getTypeDescription, getTypeSourceDescription, isAnnotationType, isAnnotationTypeElement, isClass, isConstructor, isDeprecated, isEnum, isEnumConstant, isError, isException, isField, isHidden, isIncluded, isInterface, isMarkdown, isMethod, isOrdinaryClass, isRecord, isScript, isTrait, name, setCommentText, setDeprecated, setFirstSentenceCommentText, setHidden, setMarkdown, setRawCommentText, setScript, setTokenType, tags, toString, tokenType`

- - ### Constructor Detail

    - #### public SimpleGroovyMethodDoc(String name, GroovyClassDoc belongsToClass)

      Creates a documented method owned by the supplied class.

      Parameters:
        `name` - the method name
        `belongsToClass` - the declaring class

  - ### Method Detail

    - #### public GroovyClassDoc overriddenClass()

      * Returns the class in which the overridden method is declared. * *

      Returns:
        the overridden method's declaring class, or `null` if none exists

    - #### public GroovyMethodDoc overriddenMethod()

      * Returns the method that this method overrides. * *

      Returns:
        the overridden method, or `null` if none exists

    - #### public GroovyType overriddenType()

      * Returns the type that declares the method overridden by this method. * *

      Returns:
        the overridden type, or `null` if none exists

    - #### public boolean overrides(GroovyMethodDoc arg0)

      * Indicates whether this method overrides the supplied method. * *

      Parameters:
        `arg0` - the candidate method *
      Returns:
        `true` if this method overrides `arg0`

    - #### public GroovyType returnType()

      * Returns the declared return type of this method. * *

      Returns:
        the return type

    - #### public void setReturnType(GroovyType returnType)

      * Updates the declared return type of this method. * *

      Parameters:
        `o` - the return type to associate with this method

    - #### public void setTypeParameters(String typeParameters)

      Stores the rendered type parameters for this method.

      Parameters:
        `typeParameters` - the type parameter declaration text

    - #### public String typeParameters()

      Returns the rendered type parameters for this method.

      Returns:
        the type parameter declaration text