MethodSignature (PsiClass inheritor, @NotNull PsiClass parentClass, PsiMethod method) { PsiSubstitutor substitutor = TypeConversionUtil.getMaybeSuperClassSubstitutor(parentClass, inheritor, PsiSubstitutor.EMPTY); // if null, we have EJB custom inheritance here and still check overriding return method.getSignature(substitutor != null ? substitutor : PsiSubstitutor.EMPTY); }