Package groovy.transform.stc
Class SecondParam
java.lang.Object
groovy.transform.stc.ClosureSignatureHint
groovy.transform.stc.SingleSignatureClosureHint
groovy.transform.stc.PickAnyArgumentHint
groovy.transform.stc.SecondParam
- Direct Known Subclasses:
- SecondParam.Component
public class SecondParam extends PickAnyArgumentHint
A hint used to instruct the type checker to pick the second parameter type. For example:
public <T,U> def doWith(T first, U second, @ClosureParams(SecondParam.class) Closure c) { c.call(src); }
 This class has several inner classes that also helps picking generic argument types instead of the parameter type.
- Since:
- 2.3.0
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classSecondParam.ComponentA 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:static classSecondParam.FirstGenericTypeA hint used to instruct the type checker to pick the first generic type of the second parameter type.static classSecondParam.SecondGenericTypeA hint used to instruct the type checker to pick the second generic type of the second parameter type.static classSecondParam.ThirdGenericTypeA hint used to instruct the type checker to pick the second generic type of the second parameter type.
- 
Constructor SummaryConstructors Constructor Description SecondParam()
- 
Method SummaryMethods inherited from class groovy.transform.stc.PickAnyArgumentHintgetParameterTypesMethods inherited from class groovy.transform.stc.SingleSignatureClosureHintgetClosureSignaturesMethods inherited from class groovy.transform.stc.ClosureSignatureHintfindClassNode, pickGenericType, pickGenericTypeMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
- 
Constructor Details- 
SecondParampublic SecondParam()
 
-