boolean (@NotNull PsiVariable field, PsiElement context) { if (context == null) { return false; } final PsiType type = field.getType(); if (!PsiTypes.booleanType().equals(type)) { return false; } final AlwaysNegatedVisitor visitor = new AlwaysNegatedVisitor(field); context.accept(visitor); return visitor.isRead() && visitor.isAlwaysNegated(); }