Groovy Documentation

org.codenarc.results
[Groovy] Class FileResults

java.lang.Object
  org.codenarc.results.FileResults
All Implemented Interfaces:
Results

class FileResults

Represents the results of applying a set of rules against a single sourcefile

Authors:
Chris Mair
Version:
\$Revision: 439 \$ - \$Date: 2010-11-08 15:16:30 -0500 (Mon, 08 Nov 2010) \$


Constructor Summary
FileResults(String path, List violations)

 
Method Summary
Results findResultsForPath(String path)

Return the Results object with the specified path.

List getChildren()

Return an empty List

int getNumberOfFilesWithViolations(boolean recursive = true)

Return 1 if these results include at least one violation

int getNumberOfViolationsWithPriority(int priority, boolean recursive = true)

@param recursive - true if the returned count should include subdirectories as well; defaults to true

String getPath()

@return the path to the file or directory associated with these results

int getTotalNumberOfFiles(boolean recursive = true)

Return the total number of (Groovy) files analyzed

List getViolationsWithPriority(int priority)

@return the List of violations with the specified priority; may be empty

boolean isFile()

@return true (this object represents the results for a single file)

String toString()

 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Constructor Detail

FileResults

FileResults(String path, List violations)


 
Method Detail

findResultsForPath

Results findResultsForPath(String path)
Return the Results object with the specified path.
Parameters:
path - - the path to search for
Returns:
this Results object if the path matches, otherwise null


getChildren

List getChildren()
Return an empty List
Returns:
the List of child Results objects; may be empty


getNumberOfFilesWithViolations

int getNumberOfFilesWithViolations(boolean recursive = true)
Return 1 if these results include at least one violation
Parameters:
recursive - - ignored; defaults to true
Returns:
the number of files containing violations


getNumberOfViolationsWithPriority

int getNumberOfViolationsWithPriority(int priority, boolean recursive = true)
Parameters:
recursive - - true if the returned count should include subdirectories as well; defaults to true
Returns:
the number of violations with the specified priority


getPath

String getPath()
Returns:
the path to the file or directory associated with these results


getTotalNumberOfFiles

int getTotalNumberOfFiles(boolean recursive = true)
Return the total number of (Groovy) files analyzed
Parameters:
recursive - - true if the returned count should include subdirectories as well
Returns:
the total number of files (with or without violations)


getViolationsWithPriority

List getViolationsWithPriority(int priority)
Returns:
the List of violations with the specified priority; may be empty


isFile

boolean isFile()
Returns:
true (this object represents the results for a single file)


toString

String toString()


 

Groovy Documentation