MethodPresentation (@NotNull PsiMethod method, @NotNull PsiSubstitutor substitutor) { PsiType returnType = substitutor.substitute(method.getReturnType()); String type = returnType == null ? "" : returnType.getPresentableText(true); StringBuilder buffer = new StringBuilder(); appendModifierList(buffer, method); String modifiers = buffer.toString(); List<ParameterPresentation> parameters = ContainerUtil.map(method.getParameterList().getParameters(), param -> ParameterPresentation.from(param, substitutor)); return new MethodPresentation(modifiers, type, method.getName(), method.isConstructor(), method.isDeprecated(), method.isVarArgs(), parameters); }