I don't yet have a unit test, but the use case is that you want PMD to analyze the classes themselves in addition to the AST. Type resolution uses the auxclasspath parameter to make not just the source but the classes available on the JVM.
My use case is that we have specific rules about how a class may be used, and we are trying to enforce these by way of a rule. Every subclass of a given class may provide several methods which may be called via reflection remotely. The goal of this tests is to statically ensure that only legal methods are called.
Another example of how this can be helpful is the built in abstract junit rule (http://pmd.sourceforge.net/xref/net/sourceforge/pmd/rules/junit/AbstractJUnitRule.html). This checks, (among other things) whether the test is written to junit version 3 or 4, and allows subclasses to ask if a given method is a test method. This is not possible for JUnit 3 tests classes if the test class cannot be inspected to see if it extends TestCase.
can you provide an unit test, showing a different result when this option is used and when it is not used?