private void checkForMutableFields(Protoclass protoclass, TypeElement element) { for (VariableElement field : ElementFilter.fieldsIn( processing.getElementUtils().getAllMembers(CachingElements.getDelegate(element)))) { if (!field.getModifiers().contains(Modifier.FINAL)) { Reporter report = protoclass.report(); boolean ownField = CachingElements.equals(element, field.getEnclosingElement()); if (ownField) { report .withElement(field) .warning("Avoid introduction of fields (except constants) in abstract value types"); } else { report.warning("Abstract value type inherits mutable fields"); } } } }