@@ -65,11 +65,6 @@ public AnnotatedMethod withAnnotations(AnnotationMap ann) {
6565 return new AnnotatedMethod (_typeContext , _method , ann , _paramAnnotations );
6666 }
6767
68- /*
69- /*****************************************************
70- /* Annotated impl
71- /*****************************************************
72- */
7368
7469 @ Override
7570 public Method getAnnotated () { return _method ; }
@@ -90,12 +85,6 @@ public JavaType getType() {
9085 return _typeContext .resolveType (_method .getGenericReturnType ());
9186 }
9287
93- @ Deprecated
94- @ Override
95- public Type getGenericType () {
96- return _method .getGenericReturnType ();
97- }
98-
9988 /**
10089 * For methods, this returns declared return type, which is only
10190 * useful with getters (setters do not usually return anything;
@@ -106,6 +95,18 @@ public Class<?> getRawType() {
10695 return _method .getReturnType ();
10796 }
10897
98+ @ Deprecated
99+ @ Override
100+ public Type getGenericType () {
101+ return _method .getGenericReturnType ();
102+ }
103+
104+ /*
105+ /*****************************************************
106+ /* AnnotatedWithParams
107+ /*****************************************************
108+ */
109+
109110 @ Override
110111 public final Object call () throws Exception {
111112 return _method .invoke (null );
@@ -127,6 +128,27 @@ public final Object call1(Object arg) throws Exception {
127128 /********************************************************
128129 */
129130
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+
130152 @ Override
131153 public Class <?> getDeclaringClass () { return _method .getDeclaringClass (); }
132154
@@ -167,11 +189,6 @@ public Object getValue(Object pojo) throws IllegalArgumentException
167189 /*****************************************************
168190 */
169191
170- @ Override
171- public int getParameterCount () {
172- return getRawParameterTypes ().length ;
173- }
174-
175192 public String getFullName () {
176193 return getDeclaringClass ().getName () + "#" + getName () + "("
177194 +getParameterCount ()+" params)" ;
@@ -189,22 +206,6 @@ public Type[] getGenericParameterTypes() {
189206 return _method .getGenericParameterTypes ();
190207 }
191208
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-
208209 public Class <?> getRawReturnType () {
209210 return _method .getReturnType ();
210211 }
0 commit comments