# Package groovy.transform.stc

package groovy.transform.stc
Static type checking support with closure signature hints and validation.

`@ClosureParams` provides compile-time type hints for closures. `ClosureSignatureHint` is the base for custom hints. Powers static type checking for higher-order functions and DSLs.

- Related Packages
  Package
  Description
  groovy.transform
  Compile-time AST transformations for code generation and type checking.
  groovy.transform.builder
  Builder pattern generation via AST transformation.
  groovy.transform.options
  Customizable property handlers for transform-related property processing.
- Class
  Description
  ClassTag
  Parameter annotation marking a `Class` parameter as compiler-supplied under static compilation.
  ClosureParams
  Parameter annotation aimed at helping IDEs or the static type checker to infer the parameter types of a closure.
  ClosureSignatureConflictResolver
  If multiple candidate signatures are found after applying type hints, a conflict resolver can attempt to resolve the ambiguity.
  ClosureSignatureHint
  A closure signature hint class is always used in conjunction with the `ClosureParams` annotation.
  FirstParam
  A hint used to instruct the type checker to pick the first parameter type.
  FirstParam.Component
  A hint used to instruct the type checker to pick the type of the component of the first parameter type, which is therefore expected to be an array, like in this example:
  FirstParam.FirstGenericType
  A hint used to instruct the type checker to pick the first generic type of the first parameter type.
  FirstParam.SecondGenericType
  A hint used to instruct the type checker to pick the second generic type of the first parameter type.
  FirstParam.ThirdGenericType
  A hint used to instruct the type checker to pick the third generic type of the first parameter type.
  FromAbstractTypeMethods
  This signature hint uses abstract methods from some type (abstract class or interface) in order to infer the expected parameter types.
  FromString
  A closure parameter hint class that is convenient if you want to use a String representation of the signature.
  IncorrectTypeHintException
  Indicates that a `ClosureParams` hint declaration is invalid.
  MapEntryOrKeyValue
  A special hint which handles a common use case in the Groovy methods that work on maps.
  PickAnyArgumentHint
  Base class for hints which use the type of a parameter of the annotated method as the signature.
  PickFirstResolver
  Returns the first of several candidates found.
  POJO
  Marker interface to indicate that the normal GroovyObject methods should not be added.
  SecondParam
  A hint used to instruct the type checker to pick the second parameter type.
  SecondParam.Component
  A hint used to instruct the type checker to pick the type of the component of the second parameter type, which is therefore expected to be an array, like in this example:
  SecondParam.FirstGenericType
  A hint used to instruct the type checker to pick the first generic type of the second parameter type.
  SecondParam.SecondGenericType
  A hint used to instruct the type checker to pick the second generic type of the second parameter type.
  SecondParam.ThirdGenericType
  A hint used to instruct the type checker to pick the second generic type of the second parameter type.
  SimpleType
  Hint that resolves closure parameter types directly from option class names.
  SingleSignatureClosureHint
  A simplified version of a `ClosureSignatureHint` which is suitable for monomorphic closures, that is to say closures which only respond to a single signature.
  ThirdParam
  A hint used to instruct the type checker to pick the third parameter type.
  ThirdParam.Component
  A hint used to instruct the type checker to pick the type of the component of the third parameter type, which is therefore expected to be an array, like in this example:
  ThirdParam.FirstGenericType
  A hint used to instruct the type checker to pick the first generic type of the third parameter type.
  ThirdParam.SecondGenericType
  A hint used to instruct the type checker to pick the second generic type of the third parameter type.
  ThirdParam.ThirdGenericType
  A hint used to instruct the type checker to pick the second generic type of the third parameter type.