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)
          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)
          Cf.
 String getClassName()
          Returns the complete name of the analysed class, for instance: org.codehaus.mojo.taglist.beans.FileReport.
 String getClassNameWithSlash()
          Returns the path corresponding to the analysed 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileReport

public FileReport(File file)
Constructor.

Parameters:
file - The file to analyse.
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 analysed class, for instance: org/apache/maven/plugins/taglist/beans/FileReport.

Returns:
the file path.

getClassName

public String getClassName()
Returns the complete name of the analysed 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)
Cf. overriden method documentation.

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


Copyright © 2005-2011 Codehaus. All Rights Reserved.