List<ParameterInfoImpl> (PsiMethod superMethod, PsiMethod method) { if (method == null || !method.isValid()) return null; PsiClass containingClass = method.getContainingClass(); PsiClass superContainingClass = superMethod.getContainingClass(); if (containingClass == null || superContainingClass == null) return null; PsiSubstitutor superSubstitutor = JavaClassSupers.getInstance() .getSuperClassSubstitutor(superContainingClass, containingClass, containingClass.getResolveScope(), PsiSubstitutor.EMPTY); if (superSubstitutor == null) return null; PsiParameter[] parameters = method.getParameterList().getParameters(); PsiParameter[] superParameters = superMethod.getParameterList().getParameters(); if (parameters.length != superParameters.length) return null; List<ParameterInfoImpl> infos = new ArrayList<>(parameters.length); for (int i = 0; i < parameters.length; i++) { PsiParameter parameter = parameters[i]; PsiParameter superParameter = superParameters[i]; PsiType superParameterType = superSubstitutor.substitute(superParameter.getType()); infos.add(ParameterInfoImpl.create(i).withName(parameter.getName()).withType(superParameterType)); } return infos; }