public class EqualsInspection extends BaseJavaLocalInspectionTool {
private static final String FIELD_NOT_INCLUDED_IN_EQUALS_METHOD = "field '%s' not included in equals method";
@Nullable
public ProblemDescriptor[] checkClass(@NotNull PsiClass psiClass, @NotNull InspectionManager inspectionManager, boolean onTheFly) {
PsiMethod psiMethod = new EqualsMethodFinder(psiClass).find();
List<ProblemDescriptor> equalsProblemDescriptors = new ProblemFinder(psiClass, inspectionManager, FIELD_NOT_INCLUDED_IN_EQUALS_METHOD).process(psiMethod);
return equalsProblemDescriptors.toArray(new ProblemDescriptor[equalsProblemDescriptors.size()]);
}