boolean (@NotNull PsiClass psiClass, @NotNull Consumer<? super String> messageConsumer) { if (psiClass.isEnum() || hasNamedArgOrNoArgConstructor(psiClass)) return true; final PsiMethod valueOf = findValueOfMethod(psiClass); if (valueOf == null) { if (!hasBuilder(psiClass)) { messageConsumer.accept(JavaFXBundle.message("unable.to.instantiate")); return false; } } return true; }