Groovy Documentation

org.codenarc.rule.generic
[Groovy] Class RequiredStringRule

java.lang.Object
  org.codenarc.rule.AbstractRule
      org.codenarc.rule.generic.RequiredStringRule

class RequiredStringRule
extends AbstractRule

Checks for a specified String that must exist within the source code.

The string property specifies the String of text to check for. If null or empty, do nothing.

A RuleSet can contain any number of instances of this rule, but each should be configured with a unique rule name, string, violationMessage and (optionally) customized priority.

Authors:
Chris Mair
Version:
\$Revision: 486 \$ - \$Date: 2010-11-29 22:04:18 -0500 (Mon, 29 Nov 2010) \$


Property Summary
String name

int priority

String string

 
Method Summary
void applyTo(SourceCode sourceCode, List violations)

boolean isReady()

 
Methods inherited from class AbstractRule
applyTo, applyTo, createViolation, createViolation, createViolationForImport, createViolationForImport, getImportsSortedByLineNumber, getName, getPriority, isReady, packageNameForImport, setName, setPriority, sourceLineAndNumberForImport, sourceLineAndNumberForImport, toString, validate
 

Property Detail

name

String name


priority

int priority


string

String string


 
Method Detail

applyTo

void applyTo(SourceCode sourceCode, List violations)


isReady

boolean isReady()


 

Groovy Documentation