Class FileReport

java.lang.Object
org.codehaus.mojo.taglist.beans.FileReport
All Implemented Interfaces:
Comparable<FileReport>

public class FileReport extends Object implements Comparable<FileReport>
Report for a file.
Author:
Fabrice Bellingard
  • Constructor Details

    • FileReport

      public FileReport(File file, String encoding)
      Constructor.
      Parameters:
      file - The file to analyze.
      encoding - the file encoding to use for the report.
  • Method Details

    • addComment

      public void addComment(String comment, int lineIndex)
      Adds a new entry to the list of tags found for this file report.
      Parameters:
      comment - the comment string containing the 'todo'.
      lineIndex - the line number of the comment (or first line if multi-lined).
    • getClassNameWithSlash

      public String getClassNameWithSlash()
      Returns the path corresponding to the analyzed class, for instance: org/apache/maven/plugins/taglist/beans/FileReport.
      Returns:
      the file path.
    • getClassName

      public String getClassName()
      Returns the complete name of the analyzed class, for instance: org.codehaus.mojo.taglist.beans.FileReport.
      Returns:
      the full class name.
    • getLineIndexes

      public Collection<Integer> getLineIndexes()
      Returns the list of the comment line indexes.
      Returns:
      Collection of Integer.
    • getComment

      public String getComment(Integer lineIndex)
      Returns the comment for the corresponding line index.
      Parameters:
      lineIndex - the index of the line.
      Returns:
      the comment.
    • compareTo

      public int compareTo(FileReport o)
      Specified by:
      compareTo in interface Comparable<FileReport>
      See Also:
    • equals

      public boolean equals(Object r)
      Overrides:
      equals in class Object
      See Also:
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
      See Also: