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