Run queries for types with > 20 methods, > 500 lines, or cyclomatic complexity > 25. Prioritize refactoring.
Just as NDepend uses C# LINQ for code querying, JArchitect allows you to write custom rules using a LINQ-like syntax to query your Java code for smells or architectural violations.
You write these queries once, save them as rules, and NDepend runs them on every build.
If you are looking for NDepend-like capabilities, you should consider this stack of tools often used by Java architects: NDepend for Java
// Warn if any class in persistence uses a raw SQL string from m in Methods where m.ParentNamespace.Name.Contains("persistence") && m.CodeString.Contains("executeQuery") select m

