boolean (@NotNull PsiMethod psiMethod, @NotNull PsiAnnotation psiAnnotation, @NotNull ProblemSink problemSink) { final PsiClass psiClass = psiMethod.getContainingClass(); boolean result = null != psiClass; if (result) { final String builderClassName = getBuilderClassName(psiClass, psiAnnotation, psiMethod); final Project project = psiAnnotation.getProject(); final String buildMethodName = getBuildMethodName(psiAnnotation); final String builderMethodName = getBuilderMethodName(psiAnnotation); result = validateBuilderIdentifier(builderClassName, project, problemSink) && validateBuilderIdentifier(buildMethodName, project, problemSink) && (builderMethodName.isEmpty() || validateBuilderIdentifier(builderMethodName, project, problemSink)) && validateExistingBuilderClass(builderClassName, psiClass, problemSink); if (result) { final Stream<BuilderInfo> builderInfos = createBuilderInfos(psiClass, psiMethod); result = validateObtainViaAnnotations(builderInfos, problemSink); } } return result; }