Package org.codehaus.groovy.tools.groovydoc

# Class SimpleGroovyParameter

java.lang.Object
org.codehaus.groovy.tools.groovydoc.SimpleGroovyParameter

All Implemented Interfaces:
  `GroovyParameter`

public class SimpleGroovyParameter extends Object implements GroovyParameter
Default `GroovyParameter` implementation.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SimpleGroovyParameter(String name)`
  Creates a documented parameter with the supplied name.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addAnnotationRef(GroovyAnnotationRef ref)`
  Adds an annotation reference declared on this parameter.
  `GroovyAnnotationRef[]`
  `annotations()`
  Returns the annotations declared on this parameter.
  `String`
  `defaultValue()`
  Returns the default value expression declared for this parameter.
  `boolean`
  `isTypeAvailable()`
  Indicates whether the parameter type has been resolved.
  `String`
  `name()`
  Returns the parameter name.
  `void`
  `setDefaultValue(String defaultValue)`
  Stores the default value expression declared for this parameter.
  `void`
  `setType(GroovyType type)`
  Sets the resolved parameter type for later class resolution.
  `void`
  `setTypeName(String typeName)`
  Stores the unresolved type name declared for this parameter.
  `void`
  `setVararg(boolean vararg)`
  Sets whether this parameter is variadic.
  `GroovyType`
  `type()`
  Returns the resolved parameter type.
  `String`
  `typeName()`
  Returns the parameter type name as declared in source.
  `boolean`
  `vararg()`
  Indicates whether this parameter is variadic.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### SimpleGroovyParameter

    public SimpleGroovyParameter(String name)
    Creates a documented parameter with the supplied name.
    Parameters:
      `name` - the parameter name

- ## Method Details

  - ### defaultValue

    public String defaultValue()
    Returns the default value expression declared for this parameter.
    Specified by:
      `defaultValue` in interface `GroovyParameter`
    Returns:
      the default value expression, or `null` if none is declared

  - ### setDefaultValue

    public void setDefaultValue(String defaultValue)
    Stores the default value expression declared for this parameter.
    Parameters:
      `defaultValue` - the default value expression

  - ### name

    public String name()
    Returns the parameter name.
    Specified by:
      `name` in interface `GroovyParameter`
    Returns:
      the parameter name

  - ### typeName

    public String typeName()
    Returns the parameter type name as declared in source.
    Specified by:
      `typeName` in interface `GroovyParameter`
    Returns:
      the declared type name

  - ### setTypeName

    public void setTypeName(String typeName)
    Stores the unresolved type name declared for this parameter.
    Parameters:
      `typeName` - the declared type name

  - ### annotations

    public GroovyAnnotationRef[] annotations()
    Returns the annotations declared on this parameter.
    Specified by:
      `annotations` in interface `GroovyParameter`
    Returns:
      the parameter annotations

  - ### addAnnotationRef

    public void addAnnotationRef(GroovyAnnotationRef ref)
    Adds an annotation reference declared on this parameter.
    Parameters:
      `ref` - the annotation reference to add

  - ### type

    public GroovyType type()
    Returns the resolved parameter type.
    Specified by:
      `type` in interface `GroovyParameter`
    Returns:
      the parameter type, or `null` if it is unavailable

  - ### setType

    public void setType(GroovyType type)
    Sets the resolved parameter type for later class resolution.
    Parameters:
      `type` - the resolved parameter type

  - ### isTypeAvailable

    public boolean isTypeAvailable()
    Indicates whether the parameter type has been resolved.
    Returns:
      `true` if the parameter type is available

  - ### vararg

    public boolean vararg()
    Indicates whether this parameter is variadic.
    Returns:
      `true` if this parameter is variadic

  - ### setVararg

    public void setVararg(boolean vararg)
    Sets whether this parameter is variadic.
    Parameters:
      `vararg` - `true` if this parameter is variadic