Top Description Inners Constructors Methods
groovy.transform.stc

public Class ThirdParam

extends PickAnyArgumentHint
Class Inheritance
Known Direct Subclasses
groovy.transform.stc.ThirdParam.Component
Imports
org.codehaus.groovy.ast.ASTNode, .ClassNode, .MethodNode, org.codehaus.groovy.control.CompilationUnit, .SourceUnit

A hint used to instruct the type checker to pick the third parameter type. For example:

public <T,U,V> def doWith(T first, U second, V third, @ClosureParams(ThirdParam.class) Closure c) { ... }

This class has several inner classes that also helps picking generic argument types instead of the parameter type.

Since
2.3.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
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: void <T> doWithArray(String first, int second, T[] third, @ClosureParams(FirstParam.Component.class) Closure c) { ...

public static class
ThirdParam.FirstGenericType

A hint used to instruct the type checker to pick the first generic type of the third parameter type.

public static class
ThirdParam.SecondGenericType

A hint used to instruct the type checker to pick the second generic type of the third parameter type.

public static class
ThirdParam.ThirdGenericType

A hint used to instruct the type checker to pick the second generic type of the third parameter type.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from groovy.transform.stc.PickAnyArgumentHint:
getParameterTypes

Constructor Detail

ThirdParamback to summary
public ThirdParam()
groovy.transform.stc back to summary

public Class ThirdParam.Component

extends ThirdParam
Class Inheritance

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:

void <T> doWithArray(String first, int second, T[] third, @ClosureParams(FirstParam.Component.class) Closure c) { ... }

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ClassNode[]
getParameterTypes(final MethodNode node, final String[] options, final SourceUnit sourceUnit, final CompilationUnit unit, final ASTNode usage)

Overrides groovy.transform.stc.PickAnyArgumentHint.getParameterTypes.

Constructor Detail

Componentback to summary
public Component()

Method Detail

getParameterTypesback to summary
public ClassNode[] getParameterTypes(final MethodNode node, final String[] options, final SourceUnit sourceUnit, final CompilationUnit unit, final ASTNode usage)

Overrides groovy.transform.stc.PickAnyArgumentHint.getParameterTypes.

Annotations
@Override
groovy.transform.stc back to summary

public Class ThirdParam.FirstGenericType

extends PickAnyArgumentHint
Class Inheritance

A hint used to instruct the type checker to pick the first generic type of the third parameter type. For example:

void <T> doWithElements(String first, Integer second, List<T> third, @ClosureParams(SecondParam.FirstGenericType.class) Closure c) { ... } }
Since
2.3.0

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from groovy.transform.stc.PickAnyArgumentHint:
getParameterTypes

Constructor Detail

FirstGenericTypeback to summary
public FirstGenericType()
groovy.transform.stc back to summary

public Class ThirdParam.SecondGenericType

extends PickAnyArgumentHint
Class Inheritance

A hint used to instruct the type checker to pick the second generic type of the third parameter type. For example:

void <T,U> doWithElements(String first, Integer second, Tuple<T,U> third, @ClosureParams(SecondParam.SecondGenericType.class) Closure c) { ... }
Since
2.3.0

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from groovy.transform.stc.PickAnyArgumentHint:
getParameterTypes

Constructor Detail

SecondGenericTypeback to summary
public SecondGenericType()
groovy.transform.stc back to summary

public Class ThirdParam.ThirdGenericType

extends PickAnyArgumentHint
Class Inheritance

A hint used to instruct the type checker to pick the second generic type of the third parameter type. For example:

void <T,U,V> doWithElements(String first, Integer second, Triple<T,U,V> src, @ClosureParams(SecondParam.ThirdGenericType.class) Closure c) { ... }
Since
2.3.0

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from groovy.transform.stc.PickAnyArgumentHint:
getParameterTypes

Constructor Detail

ThirdGenericTypeback to summary
public ThirdGenericType()