org.codehaus.mojo.taglist.beans
Class FileReport

java.lang.Object
  extended by org.codehaus.mojo.taglist.beans.FileReport
All Implemented Interfaces:
Comparable

public class FileReport
extends Object
implements Comparable

Report for a file.

Author:
Fabrice Bellingard

Constructor Summary
FileReport(File file, String encoding)
          Constructor.
 
Method Summary
 void addComment(String comment, int lineIndex)
          Adds a new entry to the list of tags found for this file report.
 int compareTo(Object o)
          
 boolean equals(Object r)
          
 String getClassName()
          Returns the complete name of the analyzed class, for instance: org.codehaus.mojo.taglist.beans.FileReport.
 String getClassNameWithSlash()
          Returns the path corresponding to the analyzed class, for instance: org/apache/maven/plugins/taglist/beans/FileReport.
 String getComment(Integer lineIndex)
          Returns the comment for the corresponding line index.
 Collection getLineIndexes()
          Returns the list of the comment line indexes.
 int hashCode()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileReport

public FileReport(File file,
                  String encoding)
Constructor.

Parameters:
file - The file to analyze.
encoding - the file encoding to use for the report.
Method Detail

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 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(Object o)

Specified by:
compareTo in interface Comparable
See Also:
Comparable.compareTo(Object)

equals

public boolean equals(Object r)

Overrides:
equals in class Object
See Also:
Object.equals(Object)

hashCode

public int hashCode()

Overrides:
hashCode in class Object
See Also:
Object.hashCode()


Copyright © 2005-2014 Codehaus. All Rights Reserved.