public static Type parameterizedRequestType ( Method method ) { if ( method != null && method . getGenericParameterTypes ( ) . length > 0 ) { Type type = method . getGenericParameterTypes ( ) [ 0 ] ; if ( type instanceof ParameterizedType ) { return ( ( ParameterizedType ) type ) . getActualTypeArguments ( ) [ 0 ] ; } } return Object . class ; }
Util function that returns the parameterized of the request Type of a given object .