In my current project I am making extensive use of dependency injection using Guice. More specifically I am using member injection to inject objects into the member variables of a class. In java member variables should usually be private, but this is even more important when using injection as the whole purpose of injecting members is to remove explicit dependencies and make code more modular. However, try as I might I cannot remember to change all my protected injected variables to private. Therefore I ended up just creating a PMD rule to the same effect.