private boolean shouldApplyThisRuleTo(SourceCode sourceCode) {
if (!enabled) return false;
if (!isReady()) return false;
SourceCodeCriteria criteria = new SourceCodeCriteria();
criteria.setApplyToFilesMatching(getApplyToFilesMatching());
criteria.setDoNotApplyToFilesMatching(getDoNotApplyToFilesMatching());
criteria.setApplyToFileNames(getApplyToFileNames());
criteria.setDoNotApplyToFileNames(getDoNotApplyToFileNames());
return criteria.matches(sourceCode);
}