}
@Override
public void applyTo(SourceCode sourceCode, List<Violation> violations) {
// If AST is null, skip this source code
ModuleNode ast = sourceCode.getAst();
if (ast != null && ast.getClasses() != null) {
for (ClassNode classNode : ast.getClasses()) {
if (shouldApplyThisRuleTo(classNode)) {
AstVisitor visitor = getAstVisitor();
visitor.setRule(this);
visitor.setSourceCode(sourceCode);
visitor.visitClass(classNode);