@Override
   public void visitTypeElement(@NotNull PsiTypeElement typeElement) {
       super.visitTypeElement(typeElement);
       final PsiType type = typeElement.getType();
       if (type instanceof PsiClassType) {
           final PsiClass referent = ((PsiClassType) type).resolve();
           if (referent instanceof PsiTypeParameter) {
               params.add((PsiTypeParameter) referent);
           }
       }
   }
@Override
   public void visitTypeElement(@NotNull PsiTypeElement typeElement)