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.
| Modifier and Type | Class 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:
|
| 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. |
| Access | Constructor and Description |
|---|---|
| public |
| ThirdParam | back to summary |
|---|---|
| public ThirdParam() | |
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) { ... }
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public ClassNode[] | getParameterTypes(final MethodNode node, final String[] options, final SourceUnit sourceUnit, final CompilationUnit unit, final ASTNode usage)
Overrides groovy. |
| Component | back to summary |
|---|---|
| public Component() | |
| getParameterTypes | back to summary |
|---|---|
| public ClassNode[] getParameterTypes(final MethodNode node, final String[] options, final SourceUnit sourceUnit, final CompilationUnit unit, final ASTNode usage) Overrides groovy.
| |
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) { ... } }
| Access | Constructor and Description |
|---|---|
| public |
| FirstGenericType | back to summary |
|---|---|
| public FirstGenericType() | |
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) { ... }
| Access | Constructor and Description |
|---|---|
| public |
| SecondGenericType | back to summary |
|---|---|
| public SecondGenericType() | |
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) { ... }
| Access | Constructor and Description |
|---|---|
| public |
| ThirdGenericType | back to summary |
|---|---|
| public ThirdGenericType() | |