Package groovy.transform.stc
Class SimpleType
java.lang.Object
groovy.transform.stc.ClosureSignatureHint
groovy.transform.stc.SingleSignatureClosureHint
groovy.transform.stc.SimpleType
Hint that resolves closure parameter types directly from option class names.
- Since:
- 2.3.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetParameterTypes(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
getClosureSignaturesMethods inherited from class groovy.transform.stc.ClosureSignatureHint
findClassNode, pickGenericType, pickGenericType
-
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:
getParameterTypesin classSingleSignatureClosureHint- Parameters:
node- the annotated method nodeoptions- the hint optionssourceUnit- the current source unitcompilationUnit- the current compilation unitusage- the closure expression or related AST node- Returns:
- the inferred parameter types
-