Lines Matching refs:method

52      * Tests whether the specified method declares a type parameter T.
53 * @param method the method
55 private void checkTypeParameter(Method method) {
56 TypeVariable<Method> typeParameter = getTypeParameter(method);
58 assertEquals(method, typeParameter.getGenericDeclaration());
62 * Tests whether the specified method declares a parameter with the
64 * @param method the method
66 private void checkParameterType(Method method) {
67 TypeVariable<Method> typeParameter = getTypeParameter(method);
68 assertLenghtOne(method.getGenericParameterTypes());
69 Type genericParameterType = method.getGenericParameterTypes()[0];
72 assertEquals(method, ((TypeVariable<?>) genericParameterType).getGenericDeclaration());
77 * @param method the declaring method
79 private void checkReturnType(Method method) {
80 TypeVariable<Method> typeParameter = getTypeParameter(method);
81 Type genericReturnType = method.getGenericReturnType();
84 assertEquals(method, ((TypeVariable<?>) genericReturnType).getGenericDeclaration());
87 Method method = clazz.getMethod("noParamNoReturn");
88 checkTypeParameter(method);
92 Method method = clazz.getMethod("paramNoReturn", Object.class);
93 checkTypeParameter(method);
94 checkParameterType(method);
98 Method method = clazz.getMethod("noParamReturn");
99 checkTypeParameter(method);
100 assertLenghtZero(method.getGenericParameterTypes());
101 checkReturnType(method);
104 Method method = clazz.getMethod("paramReturn", Object.class);
105 checkTypeParameter(method);
106 checkParameterType(method);
107 checkReturnType(method);
116 //Generic method type parameters NAMES are equal
118 //Generic method type PARAMETERS are not equal