don't know exact answer but i would try to see if checkstyle can do that. it can be invoked from build (ant/maven) and there is also eclipse plugin. if there are no default check like this i think it could be added reasonably easy.

Related Query

More Query from same tag