Package groovy.transform.stc

# Class SimpleType

java.lang.Object
groovy.transform.stc.ClosureSignatureHint
groovy.transform.stc.SingleSignatureClosureHint
groovy.transform.stc.SimpleType

public class SimpleType extends SingleSignatureClosureHint
Hint that resolves closure parameter types directly from option class names.

Since:
  2.3.0

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SimpleType()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ClassNode[]`
  `getParameterTypes(MethodNode node, String[] options, SourceUnit sourceUnit, CompilationUnit compilationUnit, ASTNode usage)`
  Returns the single parameter signature accepted by the hinted closure.

  ### Methods inherited from class groovy.transform.stc.SingleSignatureClosureHint

  `getClosureSignatures`

  ### Methods inherited from class groovy.transform.stc.ClosureSignatureHint

  `findClassNode, pickGenericType, pickGenericType`

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

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

- ## Constructor Details

  - ### SimpleType

    public SimpleType()

- ## Method Details

  - ### getParameterTypes

    public ClassNode[] getParameterTypes(MethodNode node, String[] options, SourceUnit sourceUnit, CompilationUnit compilationUnit, ASTNode usage)
    Returns the single parameter signature accepted by the hinted closure.
    Specified by:
      `getParameterTypes` in class `SingleSignatureClosureHint`
    Parameters:
      `node` - the annotated method node
      `options` - the hint options
      `sourceUnit` - the current source unit
      `compilationUnit` - the current compilation unit
      `usage` - the closure expression or related AST node
    Returns:
      the inferred parameter types