Package: org.codehaus.groovy.tools.groovydoc

## [Java] Class SimpleGroovyParameter

- org.codehaus.groovy.tools.groovydoc.SimpleGroovyParameter

- All Implemented Interfaces and Traits:
    GroovyParameter

      public class SimpleGroovyParameter
      extends Object
      implements GroovyParameter

  Default GroovyParameter implementation.

- - ### Constructor Summary

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

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public void` | `addAnnotationRef(GroovyAnnotationRef ref)` Adds an annotation reference declared on this parameter.
    `` | `public GroovyAnnotationRef[]` | `annotations()` Returns the annotations declared on this parameter. Returns: the parameter annotations
    `` | `public String` | `defaultValue()` Returns the default value expression declared for this parameter. Returns: the default value expression, or `null` if none is declared
    `` | `public boolean` | `isTypeAvailable()` Indicates whether the parameter type has been resolved.
    `` | `public String` | `name()` Returns the parameter name. Returns: the parameter name
    `` | `public void` | `setDefaultValue(String defaultValue)` Stores the default value expression declared for this parameter.
    `` | `public void` | `setType(GroovyType type)` Sets the resolved parameter type for later class resolution.
    `` | `public void` | `setTypeName(String typeName)` Stores the unresolved type name declared for this parameter.
    `` | `public void` | `setVararg(boolean vararg)` Sets whether this parameter is variadic.
    `` | `public GroovyType` | `type()` Returns the resolved parameter type. Returns: the parameter type, or `null` if it is unavailable
    `` | `public String` | `typeName()` Returns the parameter type name as declared in source. Returns: the declared type name
    `` | `public boolean` | `vararg()` Indicates whether this parameter is variadic.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### public SimpleGroovyParameter(String name)

      Creates a documented parameter with the supplied name.

      Parameters:
        `name` - the parameter name

  - ### Method Detail

    - #### public void addAnnotationRef(GroovyAnnotationRef ref)

      Adds an annotation reference declared on this parameter.

      Parameters:
        `ref` - the annotation reference to add

    - #### public GroovyAnnotationRef[] annotations()

      Returns the annotations declared on this parameter.

      Returns:
        the parameter annotations

    - #### public String defaultValue()

      Returns the default value expression declared for this parameter.

      Returns:
        the default value expression, or `null` if none is declared

    - #### public boolean isTypeAvailable()

      Indicates whether the parameter type has been resolved.

      Returns:
        `true` if the parameter type is available

    - #### public String name()

      Returns the parameter name.

      Returns:
        the parameter name

    - #### public void setDefaultValue(String defaultValue)

      Stores the default value expression declared for this parameter.

      Parameters:
        `defaultValue` - the default value expression

    - #### public void setType(GroovyType type)

      Sets the resolved parameter type for later class resolution.

      Parameters:
        `type` - the resolved parameter type

    - #### public void setTypeName(String typeName)

      Stores the unresolved type name declared for this parameter.

      Parameters:
        `typeName` - the declared type name

    - #### public void setVararg(boolean vararg)

      Sets whether this parameter is variadic.

      Parameters:
        `vararg` - `true` if this parameter is variadic

    - #### public GroovyType type()

      Returns the resolved parameter type.

      Returns:
        the parameter type, or `null` if it is unavailable

    - #### public String typeName()

      Returns the parameter type name as declared in source.

      Returns:
        the declared type name

    - #### public boolean vararg()

      Indicates whether this parameter is variadic.

      Returns:
        `true` if this parameter is variadic