Class SimpleGroovyMethodDoc

All Implemented Interfaces:
Comparable<GroovyDoc>, GroovyDoc, GroovyExecutableMemberDoc, GroovyMemberDoc, GroovyMethodDoc, GroovyProgramElementDoc

public class SimpleGroovyMethodDoc extends SimpleGroovyExecutableMemberDoc implements GroovyMethodDoc
Default GroovyMethodDoc implementation.
  • Constructor Details

    • SimpleGroovyMethodDoc

      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 Details

    • returnType

      public GroovyType returnType()
      Returns the declared return type of this method.
      Specified by:
      returnType in interface GroovyMethodDoc
      Returns:
      the return type
    • setReturnType

      public void setReturnType(GroovyType returnType)
      Updates the declared return type of this method.
      Specified by:
      setReturnType in interface GroovyMethodDoc
      Parameters:
      returnType - the return type to associate with this method
    • overriddenClass

      public GroovyClassDoc overriddenClass()
      Returns the class in which the overridden method is declared.
      Specified by:
      overriddenClass in interface GroovyMethodDoc
      Returns:
      the overridden method's declaring class, or null if none exists
    • overriddenMethod

      public GroovyMethodDoc overriddenMethod()
      Returns the method that this method overrides.
      Specified by:
      overriddenMethod in interface GroovyMethodDoc
      Returns:
      the overridden method, or null if none exists
    • overriddenType

      public GroovyType overriddenType()
      Returns the type that declares the method overridden by this method.
      Specified by:
      overriddenType in interface GroovyMethodDoc
      Returns:
      the overridden type, or null if none exists
    • overrides

      public boolean overrides(GroovyMethodDoc arg0)
      Indicates whether this method overrides the supplied method.
      Specified by:
      overrides in interface GroovyMethodDoc
      Parameters:
      arg0 - the candidate method
      Returns:
      true if this method overrides arg0
    • typeParameters

      public String typeParameters()
      Returns the rendered type parameters for this method.
      Returns:
      the type parameter declaration text
    • setTypeParameters

      public void setTypeParameters(String typeParameters)
      Stores the rendered type parameters for this method.
      Parameters:
      typeParameters - the type parameter declaration text