Does anyone know if PMD has the capabilities to find annotations? E.g. If I have a @BeforeClass
annotation in my JUnit testclasses, will xpath treat the annotation as being just another node?
Well you can see example of rules interfering with annotations here. Also look at the next few to follow. All of them deal with annotation checks.