Uses of Interface
org.codenarc.source.SourceCode
-
-
Uses of SourceCode in org.codenarc.analyzer
Fields in org.codenarc.analyzer declared as SourceCode Modifier and Type Field Description private SourceCode
SuppressionAnalyzer. source
Methods in org.codenarc.analyzer with parameters of type SourceCode Modifier and Type Method Description protected java.util.List<Violation>
AbstractSourceAnalyzer. collectViolations(SourceCode sourceCode, RuleSet ruleSet)
protected boolean
FilesystemSourceAnalyzer. matches(SourceCode sourceFile)
Constructors in org.codenarc.analyzer with parameters of type SourceCode Constructor Description SuppressionAnalyzer(SourceCode source)
-
Uses of SourceCode in org.codenarc.rule
Fields in org.codenarc.rule declared as SourceCode Modifier and Type Field Description private SourceCode
AbstractAstVisitor. sourceCode
private SourceCode
AbstractFieldVisitor. sourceCode
private SourceCode
AbstractMethodCallExpressionVisitor. sourceCode
private SourceCode
AbstractMethodVisitor. sourceCode
Methods in org.codenarc.rule that return SourceCode Modifier and Type Method Description SourceCode
AbstractAstVisitor. getSourceCode()
protected SourceCode
AbstractFieldVisitor. getSourceCode()
protected SourceCode
AbstractMethodCallExpressionVisitor. getSourceCode()
protected SourceCode
AbstractMethodVisitor. getSourceCode()
Methods in org.codenarc.rule with parameters of type SourceCode Modifier and Type Method Description void
AbstractAstVisitorRule. applyTo(SourceCode sourceCode, java.util.List<Violation> violations)
java.util.List<Violation>
AbstractRule. applyTo(SourceCode sourceCode)
Apply this rule to the specified source and return a list of violations (or an empty List).abstract void
AbstractRule. applyTo(SourceCode sourceCode, java.util.List<Violation> violations)
Apply this rule to the specified source and return a list of violations (or an empty List)void
AbstractSharedAstVisitorRule. applyTo(SourceCode sourceCode, java.util.List<Violation> violations)
java.util.List<Violation>
Rule. applyTo(SourceCode sourceCode)
Apply this rule to the specified source and return a list of violations (or an empty List)void
StubRule. applyTo(SourceCode sourceCode, java.util.List<Violation> violations)
protected void
AbstractSharedAstVisitorRule. applyVisitor(AstVisitor visitor, SourceCode sourceCode)
protected Violation
AbstractRule. createViolation(SourceCode sourceCode, org.codehaus.groovy.ast.ASTNode node, java.lang.String message)
Create a new Violation for the AST node.protected Violation
AbstractRule. createViolationForImport(SourceCode sourceCode, java.lang.String className, java.lang.String alias, java.lang.String violationMessage)
Create and return a new Violation for this rule and the specified import className and aliasprotected Violation
AbstractRule. createViolationForImport(SourceCode sourceCode, org.codehaus.groovy.ast.ImportNode importNode, java.lang.String message)
Create and return a new Violation for this rule and the specified importprotected AstVisitor
AbstractSharedAstVisitorRule. getAstVisitor(SourceCode sourceCode)
Subclasses can override to provide an AstVisitor with SourceCode or AST-specific initialization.protected abstract java.util.List<Violation>
AbstractSharedAstVisitorRule. getViolations(AstVisitor astVisitor, SourceCode sourceCode)
private java.util.List<Violation>
AbstractSharedAstVisitorRule. removeSuppressedViolations(java.util.List<Violation> violations, SourceCode sourceCode)
void
AbstractAstVisitor. setSourceCode(SourceCode sourceCode)
void
AbstractFieldVisitor. setSourceCode(SourceCode sourceCode)
Set the SourceCode associated with this visitorvoid
AbstractMethodCallExpressionVisitor. setSourceCode(SourceCode sourceCode)
Set the SourceCode associated with this visitorvoid
AbstractMethodVisitor. setSourceCode(SourceCode sourceCode)
Set the SourceCode associated with this visitorvoid
AstVisitor. setSourceCode(SourceCode sourceCode)
private boolean
AbstractRule. shouldApplyThisRuleTo(SourceCode sourceCode)
private void
AbstractRule. validateAstCompilerPhase(SourceCode sourceCode)
-
Uses of SourceCode in org.codenarc.rule.comments
Methods in org.codenarc.rule.comments with parameters of type SourceCode Modifier and Type Method Description void
AbstractJavadocEmptyTagRule. applyTo(SourceCode sourceCode, java.util.List<Violation> violations)
void
AbstractJavadocMissingDescriptionRule. applyTo(SourceCode sourceCode, java.util.List<Violation> violations)
void
ClassJavadocRule. applyTo(SourceCode sourceCode, java.util.List<Violation> violations)
void
JavadocConsecutiveEmptyLinesRule. applyTo(SourceCode sourceCode, java.util.List<Violation> violations)
void
JavadocEmptyFirstLineRule. applyTo(SourceCode sourceCode, java.util.List<Violation> violations)
void
JavadocEmptyLastLineRule. applyTo(SourceCode sourceCode, java.util.List<Violation> violations)
protected static boolean
CommentsUtil. hasTextOnNextLine(SourceCode sourceCode, int lineNumber)
protected java.lang.String
ClassJavadocRule. sourceCodeNameWithoutExtension(SourceCode sourceCode)
-
Uses of SourceCode in org.codenarc.rule.convention
Methods in org.codenarc.rule.convention with parameters of type SourceCode Modifier and Type Method Description void
NoTabCharacterRule. applyTo(SourceCode sourceCode, java.util.List<Violation> violations)
-
Uses of SourceCode in org.codenarc.rule.design
Methods in org.codenarc.rule.design with parameters of type SourceCode Modifier and Type Method Description protected java.util.List<Violation>
PrivateFieldCouldBeFinalRule. getViolations(AstVisitor visitor, SourceCode sourceCode)
-
Uses of SourceCode in org.codenarc.rule.formatting
Fields in org.codenarc.rule.formatting with type parameters of type SourceCode Modifier and Type Field Description protected java.util.Map<SourceCode,java.util.Map<org.codehaus.groovy.ast.ClassNode,java.lang.Integer>>
IndentationRule. classNodeIndentLevels
Methods in org.codenarc.rule.formatting with parameters of type SourceCode Modifier and Type Method Description void
BlankLineBeforePackageRule. applyTo(SourceCode sourceCode, java.util.List<Violation> violations)
void
BracesForClassRule. applyTo(SourceCode sourceCode, java.util.List<Violation> violations)
void
ConsecutiveBlankLinesRule. applyTo(SourceCode sourceCode, java.util.List<Violation> violations)
void
FileEndsWithoutNewlineRule. applyTo(SourceCode sourceCode, java.util.List<Violation> violations)
void
IndentationRule. applyTo(SourceCode sourceCode, java.util.List<Violation> violations)
void
LineLengthRule. applyTo(SourceCode sourceCode, java.util.List<Violation> violations)
void
MissingBlankLineAfterImportsRule. applyTo(SourceCode sourceCode, java.util.List<Violation> violations)
void
MissingBlankLineAfterPackageRule. applyTo(SourceCode sourceCode, java.util.List<Violation> violations)
void
TrailingWhitespaceRule. applyTo(SourceCode sourceCode, java.util.List<Violation> violations)
-
Uses of SourceCode in org.codenarc.rule.generic
Methods in org.codenarc.rule.generic with parameters of type SourceCode Modifier and Type Method Description void
IllegalRegexRule. applyTo(SourceCode sourceCode, java.util.List<Violation> violations)
void
IllegalStringRule. applyTo(SourceCode sourceCode, java.util.List<Violation> violations)
void
RequiredRegexRule. applyTo(SourceCode sourceCode, java.util.List<Violation> violations)
void
RequiredStringRule. applyTo(SourceCode sourceCode, java.util.List<Violation> violations)
-
Uses of SourceCode in org.codenarc.rule.imports
Methods in org.codenarc.rule.imports with parameters of type SourceCode Modifier and Type Method Description void
ImportFromSunPackagesRule. addViolationForSunImport(org.codehaus.groovy.ast.ImportNode importNode, SourceCode sourceCode, java.util.List violations)
void
DuplicateImportRule. applyTo(SourceCode sourceCode, java.util.List<Violation> violations)
void
ImportFromSamePackageRule. applyTo(SourceCode sourceCode, java.util.List<Violation> violations)
void
ImportFromSunPackagesRule. applyTo(SourceCode sourceCode, java.util.List<Violation> violations)
void
MisorderedStaticImportsRule. applyTo(SourceCode sourceCode, java.util.List<Violation> violations)
void
NoWildcardImportsRule. applyTo(SourceCode sourceCode, java.util.List<Violation> violations)
void
UnnecessaryGroovyImportRule. applyTo(SourceCode sourceCode, java.util.List<Violation> violations)
void
UnusedImportRule. applyTo(SourceCode sourceCode, java.util.List<Violation> violations)
protected void
AbstractImportRule. eachImportLine(SourceCode sourceCode, groovy.lang.Closure closure)
protected int
AbstractImportRule. findLineNumberOfFirstClassDeclaration(SourceCode sourceCode)
-
Uses of SourceCode in org.codenarc.rule.naming
Methods in org.codenarc.rule.naming with parameters of type SourceCode Modifier and Type Method Description void
ClassNameSameAsFilenameRule. applyTo(SourceCode sourceCode, java.util.List<Violation> violations)
void
PackageNameMatchesFilePathRule. applyTo(SourceCode sourceCode, java.util.List<Violation> violations)
-
Uses of SourceCode in org.codenarc.rule.size
Constructors in org.codenarc.rule.size with parameters of type SourceCode Constructor Description GMetricsSourceCodeAdapter(SourceCode sourceCode)
-
Uses of SourceCode in org.codenarc.rule.unnecessary
Methods in org.codenarc.rule.unnecessary with parameters of type SourceCode Modifier and Type Method Description void
UnnecessarySemicolonRule. applyTo(SourceCode sourceCode, java.util.List<Violation> violations)
-
Uses of SourceCode in org.codenarc.rule.unused
Methods in org.codenarc.rule.unused with parameters of type SourceCode Modifier and Type Method Description void
UnusedVariableRule. applyTo(SourceCode sourceCode, java.util.List<Violation> violations)
protected AstVisitor
UnusedPrivateFieldRule. getAstVisitor(SourceCode sourceCode)
protected AstVisitor
UnusedPrivateMethodRule. getAstVisitor(SourceCode sourceCode)
protected java.util.List<Violation>
UnusedPrivateFieldRule. getViolations(AstVisitor visitor, SourceCode sourceCode)
protected java.util.List<Violation>
UnusedPrivateMethodRule. getViolations(AstVisitor visitor, SourceCode sourceCode)
-
Uses of SourceCode in org.codenarc.source
Classes in org.codenarc.source that implement SourceCode Modifier and Type Class Description class
AbstractSourceCode
class
CustomCompilerPhaseSourceDecorator
class
SourceFile
class
SourceString
Methods in org.codenarc.source with parameters of type SourceCode Modifier and Type Method Description boolean
SourceCodeCriteria. matches(SourceCode sourceCode)
Constructors in org.codenarc.source with parameters of type SourceCode Constructor Description CustomCompilerPhaseSourceDecorator(SourceCode delegate, int compilerPhase)
-
Uses of SourceCode in org.codenarc.util
Methods in org.codenarc.util with parameters of type SourceCode Modifier and Type Method Description static int
AstUtil. findFirstNonAnnotationLine(org.codehaus.groovy.ast.ASTNode node, SourceCode sourceCode)
gets the first non annotation line number of a node, taking into account annotations.static java.lang.String
AstUtil. getDeclaration(org.codehaus.groovy.ast.ASTNode node, SourceCode sourceCode)
static java.util.List
ImportUtil. getImportsSortedByLineNumber(SourceCode sourceCode)
static java.lang.String
AstUtil. getLastLineOfNodeText(org.codehaus.groovy.ast.ASTNode expression, SourceCode sourceCode)
static java.lang.String
AstUtil. getNodeText(org.codehaus.groovy.ast.ASTNode expression, SourceCode sourceCode)
static java.util.List
ImportUtil. getNonStaticImportsSortedByLineNumber(SourceCode sourceCode)
static java.lang.String
AstUtil. getRawLine(SourceCode sourceCode, int lineNumber)
static boolean
AstUtil. isFinalVariable(org.codehaus.groovy.ast.expr.DeclarationExpression declarationExpression, SourceCode sourceCode)
Return true if the DeclarationExpression represents a 'final' variable declaration.static java.util.List<java.lang.String>
SourceCodeUtil. nodeSourceLines(SourceCode source, org.codehaus.groovy.ast.ASTNode node)
static java.util.Map
ImportUtil. sourceLineAndNumberForImport(SourceCode sourceCode, java.lang.String className, java.lang.String alias)
static java.util.Map
ImportUtil. sourceLineAndNumberForImport(SourceCode sourceCode, org.codehaus.groovy.ast.ImportNode importNode)
static java.util.Map
ImportUtil. sourceLineAndNumberForNonStarImport(SourceCode sourceCode, org.codehaus.groovy.ast.ImportNode importNode)
static java.util.Map
ImportUtil. sourceLineAndNumberForStarImport(SourceCode sourceCode, org.codehaus.groovy.ast.ImportNode importNode)
static java.util.List<java.lang.String>
SourceCodeUtil. sourceLinesBetween(SourceCode source, int startLine, int startColumn, int endLine, int endColumn)
static java.util.List<java.lang.String>
SourceCodeUtil. sourceLinesBetweenNodes(SourceCode source, org.codehaus.groovy.ast.ASTNode startNode, org.codehaus.groovy.ast.ASTNode endNode)
-