Implemented multilevel capture of retrieving the type of generics.