void (@NotNull PsiClass aClass) { final PsiMethod[] constructors = aClass.getConstructors(); if (constructors.length != 1) { return; } final PsiMethod constructor = constructors[0]; final PsiIdentifier identifier = constructor.getNameIdentifier(); if (!constructor.isPhysical() || identifier == null) { return; } if (!aClass.isEnum()) { String modifier = VisibilityUtil.getVisibilityModifier(aClass.getModifierList()); if (!constructor.hasModifierProperty(modifier)) { return; } } final PsiParameterList parameterList = constructor.getParameterList(); if (!parameterList.isEmpty()) { return; } if (ignoreAnnotations) { final PsiModifierList modifierList = constructor.getModifierList(); final PsiAnnotation[] annotations = modifierList.getAnnotations(); if (annotations.length > 0) { return; } } final PsiReferenceList throwsList = constructor.getThrowsList(); final PsiJavaCodeReferenceElement[] elements = throwsList.getReferenceElements(); if (elements.length != 0) { return; } final PsiCodeBlock body = constructor.getBody(); if (ControlFlowUtils.isEmptyCodeBlock(body) || isSuperConstructorInvocationWithoutArguments(ControlFlowUtils.getOnlyStatementInBlock(body))) { registerError(identifier); } }