@@ -65,11 +65,6 @@ public AnnotatedMethod withAnnotations(AnnotationMap ann) {
65
65
return new AnnotatedMethod (_typeContext , _method , ann , _paramAnnotations );
66
66
}
67
67
68
- /*
69
- /*****************************************************
70
- /* Annotated impl
71
- /*****************************************************
72
- */
73
68
74
69
@ Override
75
70
public Method getAnnotated () { return _method ; }
@@ -90,12 +85,6 @@ public JavaType getType() {
90
85
return _typeContext .resolveType (_method .getGenericReturnType ());
91
86
}
92
87
93
- @ Deprecated
94
- @ Override
95
- public Type getGenericType () {
96
- return _method .getGenericReturnType ();
97
- }
98
-
99
88
/**
100
89
* For methods, this returns declared return type, which is only
101
90
* useful with getters (setters do not usually return anything;
@@ -106,6 +95,18 @@ public Class<?> getRawType() {
106
95
return _method .getReturnType ();
107
96
}
108
97
98
+ @ Deprecated
99
+ @ Override
100
+ public Type getGenericType () {
101
+ return _method .getGenericReturnType ();
102
+ }
103
+
104
+ /*
105
+ /*****************************************************
106
+ /* AnnotatedWithParams
107
+ /*****************************************************
108
+ */
109
+
109
110
@ Override
110
111
public final Object call () throws Exception {
111
112
return _method .invoke (null );
@@ -127,6 +128,27 @@ public final Object call1(Object arg) throws Exception {
127
128
/********************************************************
128
129
*/
129
130
131
+ @ Override
132
+ public int getParameterCount () {
133
+ return getRawParameterTypes ().length ;
134
+ }
135
+
136
+ @ Override
137
+ public Class <?> getRawParameterType (int index )
138
+ {
139
+ Class <?>[] types = getRawParameterTypes ();
140
+ return (index >= types .length ) ? null : types [index ];
141
+ }
142
+
143
+ @ Override
144
+ public JavaType getParameterType (int index ) {
145
+ Type [] types = _method .getGenericParameterTypes ();
146
+ if (index >= types .length ) {
147
+ return null ;
148
+ }
149
+ return _typeContext .resolveType (types [index ]);
150
+ }
151
+
130
152
@ Override
131
153
public Class <?> getDeclaringClass () { return _method .getDeclaringClass (); }
132
154
@@ -167,11 +189,6 @@ public Object getValue(Object pojo) throws IllegalArgumentException
167
189
/*****************************************************
168
190
*/
169
191
170
- @ Override
171
- public int getParameterCount () {
172
- return getRawParameterTypes ().length ;
173
- }
174
-
175
192
public String getFullName () {
176
193
return getDeclaringClass ().getName () + "#" + getName () + "("
177
194
+getParameterCount ()+" params)" ;
@@ -189,22 +206,6 @@ public Type[] getGenericParameterTypes() {
189
206
return _method .getGenericParameterTypes ();
190
207
}
191
208
192
- @ Override
193
- public Class <?> getRawParameterType (int index )
194
- {
195
- Class <?>[] types = getRawParameterTypes ();
196
- return (index >= types .length ) ? null : types [index ];
197
- }
198
-
199
- @ Override
200
- public JavaType getParameterType (int index ) {
201
- Type [] types = _method .getGenericParameterTypes ();
202
- if (index >= types .length ) {
203
- return null ;
204
- }
205
- return _typeContext .resolveType (types [index ]);
206
- }
207
-
208
209
public Class <?> getRawReturnType () {
209
210
return _method .getReturnType ();
210
211
}
0 commit comments