File tree 3 files changed +24
-5
lines changed
src/main/java/com/fasterxml/jackson/databind/introspect
3 files changed +24
-5
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,16 @@ public JavaType getParameterType(int index) {
104
104
return _typeContext .resolveType (types [index ]);
105
105
}
106
106
107
+ @ Override
108
+ @ Deprecated // since 2.7
109
+ public Type getGenericParameterType (int index ) {
110
+ Type [] types = _constructor .getGenericParameterTypes ();
111
+ if (index >= types .length ) {
112
+ return null ;
113
+ }
114
+ return types [index ];
115
+ }
116
+
107
117
@ Override
108
118
public final Object call () throws Exception {
109
119
return _constructor .newInstance ();
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ public Class<?> getRawType() {
100
100
public Type getGenericType () {
101
101
return _method .getGenericReturnType ();
102
102
}
103
-
103
+
104
104
/*
105
105
/*****************************************************
106
106
/* AnnotatedWithParams
@@ -149,6 +149,16 @@ public JavaType getParameterType(int index) {
149
149
return _typeContext .resolveType (types [index ]);
150
150
}
151
151
152
+ @ Override
153
+ @ Deprecated // since 2.7
154
+ public Type getGenericParameterType (int index ) {
155
+ Type [] types = getGenericParameterTypes ();
156
+ if (index >= types .length ) {
157
+ return null ;
158
+ }
159
+ return types [index ];
160
+ }
161
+
152
162
@ Override
153
163
public Class <?> getDeclaringClass () { return _method .getDeclaringClass (); }
154
164
@@ -201,7 +211,8 @@ public Class<?>[] getRawParameterTypes()
201
211
}
202
212
return _paramClasses ;
203
213
}
204
-
214
+
215
+ @ Deprecated // since 2.7
205
216
public Type [] getGenericParameterTypes () {
206
217
return _method .getGenericParameterTypes ();
207
218
}
Original file line number Diff line number Diff line change @@ -119,9 +119,7 @@ public final AnnotatedParameter getParameter(int index) {
119
119
* @deprecated Since 2.7, remove in 2.8
120
120
*/
121
121
@ Deprecated
122
- public final Type getGenericParameterType (int index ) {
123
- return getRawParameterType (index );
124
- }
122
+ public abstract Type getGenericParameterType (int index );
125
123
126
124
public final int getAnnotationCount () { return _annotations .size (); }
127
125
You can’t perform that action at this time.
0 commit comments