boolean (@Nullable PsiMethod method, @NotNull RestrictionInfoFactory<?> factory) { if (method == null) return false; if (factory.fromModifierListOwner(method).getKind() == RestrictionInfo.RestrictionInfoKind.KNOWN) return false; if (!JavaMethodContractUtil.isPure(method)) return false; PsiParameter[] parameters = method.getParameterList().getParameters(); if (parameters.length == 0) return false; for (PsiParameter parameter : parameters) { if (factory.fromModifierListOwner(parameter).getKind() == RestrictionInfo.RestrictionInfoKind.KNOWN) return false; } return true; }