views:

30

answers:

1

Is there anyway to run a package dependency analysis using jDepend, ant contrib's verifydesign task, or any other similar tool, which uses blacklists instead of whitelists?

That is to say, I want to be far less strict (at least initially). Instead of specifying package A must only depend on B, C and K; package B must only depend on Q, W and R; etc. for every package in the system, I'd like to begin by saying: package A absolutely can't have any contact with W and Y, and anything else it does is alright by me. I could then gradually add in the full list of expected dependencies (A depends on only B, C, K) for each package over time, as things are refactored.

So does a tool exist to do this?

+1  A: 

I can do one better: you can express such things in AspectJ AOP so that it can be enforced at runtime. "AspectJ In Action" shows you how.

duffymo