code: private void validateField(VariableElement injectedField) {
      if (injectedField.getModifiers().contains(Modifier.PRIVATE)) {
        messager.printMessage(Kind.ERROR,
            "Property "
                + injectedField.getSimpleName()
                + " in "
                + injectedField
                .getEnclosingElement()
                .getSimpleName()
                + " cannot be injected and private. Please make it at least package protected.");
      }
      if (injectedField.getModifiers().contains(Modifier.FINAL)) {
        messager.printMessage(Kind.ERROR,
            "Property " + injectedField.getSimpleName() + " in " + injectedField
                .getEnclosingElement()
                .getSimpleName() + " cannot be injected and final.");
      }
    }
docs: Validate properties. This will make sure that @Inject properties are not private or final. We
  can't inject final or private properties are injection is done at runtime by copying over
  properties from an injected instance of our Java Component.
  
  @param injectedField The property to validate