hudson.plugins.checkstyle.util.model
Interface FileAnnotation

All Superinterfaces:
java.lang.Comparable<FileAnnotation>
All Known Implementing Classes:
AbstractAnnotation, Warning

public interface FileAnnotation
extends java.lang.Comparable<FileAnnotation>

Annotates a collection of line ranges in a file. An annotation consists of a description and a tooltip.

Author:
Ulli Hafner

Method Summary
 boolean canDisplayFile(hudson.model.AbstractBuild<?,?> owner)
          Checks if the file exists.
 java.lang.String getCategory()
          Returns the category of the annotation.
 java.lang.String getFileName()
          Returns the absolute path of the workspace file that contains this annotation.
 long getKey()
          Returns the unique key of this annotation.
 java.util.Collection<LineRange> getLineRanges()
          Returns a collection of line ranges for this annotation.
 java.lang.String getMessage()
          Returns the message of this annotation.
 java.lang.String getModuleName()
          Returns the name of the maven or ant module that contains this annotation.
 java.lang.String getPackageName()
          Returns the name of package (or namespace) that contains this annotation.
 int getPrimaryLineNumber()
          Returns the primary line number of this annotation that defines the anchor of this annotation.
 Priority getPriority()
          Returns the priority of this annotation.
 java.lang.String getShortFileName()
          Gets the associated file name of this bug (without path).
 java.lang.String getTempName(hudson.model.AbstractBuild<?,?> owner)
          Returns a file name for a temporary file that will hold the contents of the source.
 java.lang.String getToolTip()
          Returns the a detailed description that will be used as tooltip.
 java.lang.String getType()
          Returns the annotation type.
 void setFileName(java.lang.String fileName)
          Sets the file name to the specified value.
 void setModuleName(java.lang.String moduleName)
          Sets the name of the maven or ant module that contains this annotation.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getMessage

java.lang.String getMessage()
Returns the message of this annotation.

Returns:
the message of this annotation

getToolTip

java.lang.String getToolTip()
Returns the a detailed description that will be used as tooltip.

Returns:
the tooltip of this annotation

getPrimaryLineNumber

int getPrimaryLineNumber()
Returns the primary line number of this annotation that defines the anchor of this annotation.

Returns:
the primary line number of this annotation

getLineRanges

java.util.Collection<LineRange> getLineRanges()
Returns a collection of line ranges for this annotation.

Returns:
the collection of line ranges for this annotation.

getKey

long getKey()
Returns the unique key of this annotation.

Returns:
the unique key of this annotation.

getPriority

Priority getPriority()
Returns the priority of this annotation.

Returns:
the priority of this annotation

getFileName

java.lang.String getFileName()
Returns the absolute path of the workspace file that contains this annotation.

Returns:
the name of the workspace file that contains this annotation

getTempName

java.lang.String getTempName(hudson.model.AbstractBuild<?,?> owner)
Returns a file name for a temporary file that will hold the contents of the source. This temporary file is used in a master - slave scenario where the original file remains on the slave while this temporary file is transferred to the master.

Parameters:
owner - the owner that provides the root directory where the files are stored
Returns:
the temporary name

setFileName

void setFileName(java.lang.String fileName)
Sets the file name to the specified value.

Parameters:
fileName - the value to set

canDisplayFile

boolean canDisplayFile(hudson.model.AbstractBuild<?,?> owner)
Checks if the file exists.

Parameters:
owner - the owner that provides the root directory where the files are stored
Returns:
true, if successful

getShortFileName

java.lang.String getShortFileName()
Gets the associated file name of this bug (without path).

Returns:
the short file name

getModuleName

java.lang.String getModuleName()
Returns the name of the maven or ant module that contains this annotation.

Returns:
the name of the module that contains this annotation

setModuleName

void setModuleName(java.lang.String moduleName)
Sets the name of the maven or ant module that contains this annotation.

Parameters:
moduleName - the name of the module that contains this annotation

getPackageName

java.lang.String getPackageName()
Returns the name of package (or namespace) that contains this annotation.

Returns:
the name of the package that contains this annotation

getCategory

java.lang.String getCategory()
Returns the category of the annotation. Might be an empty string if there is no category.

Returns:
the annotation category

getType

java.lang.String getType()
Returns the annotation type. Might be an empty string if there is no type.

Returns:
the annotation type


Copyright © 2008. All Rights Reserved.