Extract getParameterizedClass method