Package groovy.transform.stc
Class FirstParam
java.lang.Object
groovy.transform.stc.ClosureSignatureHint
groovy.transform.stc.SingleSignatureClosureHint
groovy.transform.stc.PickAnyArgumentHint
groovy.transform.stc.FirstParam
- Direct Known Subclasses:
FirstParam.Component
public class FirstParam extends PickAnyArgumentHint
A hint used to instruct the type checker to pick the first parameter type. For example:
public <T> def doWith(T src, @ClosureParams(FirstParam.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 Summary
Nested Classes Modifier and Type Class Description static classFirstParam.ComponentA 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:static classFirstParam.FirstGenericTypeA hint used to instruct the type checker to pick the first generic type of the first parameter type.static classFirstParam.SecondGenericTypeA hint used to instruct the type checker to pick the second generic type of the first parameter type.static classFirstParam.ThirdGenericTypeA hint used to instruct the type checker to pick the third generic type of the first parameter type. -
Constructor Summary
Constructors Constructor Description FirstParam() -
Method Summary
Methods inherited from class groovy.transform.stc.PickAnyArgumentHint
getParameterTypesMethods inherited from class groovy.transform.stc.SingleSignatureClosureHint
getClosureSignaturesMethods inherited from class groovy.transform.stc.ClosureSignatureHint
findClassNode, pickGenericType, pickGenericTypeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
FirstParam
public FirstParam()
-