|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.plugins.analysis.util.model.AbstractAnnotation
@ExportedBean public abstract class AbstractAnnotation
A base class for annotations.
| Field Summary | |
|---|---|
static String |
WORKSPACE_FILES
Temporary directory holding the workspace files. |
| Constructor Summary | |
|---|---|
AbstractAnnotation(AbstractAnnotation copy)
Copy constructor: Creates a new instance of AbstractAnnotation. |
|
AbstractAnnotation(Priority priority,
String message,
int start,
int end,
String category,
String type)
Creates a new instance of AbstractAnnotation. |
|
AbstractAnnotation(String message,
int start,
int end,
String category,
String type)
Creates a new instance of AbstractAnnotation. |
|
| Method Summary | |
|---|---|
void |
addLineRange(LineRange lineRange)
Adds another line range to this annotation. |
boolean |
canDisplayFile(hudson.model.AbstractBuild<?,?> owner)
Checks if the file exists and the user is authorized to see the contents of the file. |
int |
compareTo(FileAnnotation other)
|
boolean |
equals(Object obj)
|
String |
getCategory()
Returns the category of the annotation. |
long |
getContextHashCode()
Returns a hash code of the surrounding context of this annotation. |
String |
getFileName()
Returns the absolute path of the workspace file that contains this annotation. |
long |
getKey()
Returns the unique key of this annotation. |
Collection<LineRange> |
getLineRanges()
Returns a collection of line ranges for this annotation. |
int |
getLinkLineNumber()
Returns the line number that should be shown on top of the source code view. |
String |
getLinkName()
Returns the name of this annotation that could be used as text in links. |
String |
getMessage()
Returns the message of this annotation. |
String |
getModuleName()
Returns the name of the maven or ant module that contains this annotation. |
String |
getOrigin()
Returns the origin of the annotation. |
String |
getPackageName()
Returns the name of package (or namespace) that contains this annotation. |
String |
getPathName()
Returns the path name of this annotation (relative path to the affected file). |
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. |
String |
getShortFileName()
Gets the associated file name of this bug (without path). |
String |
getTempName(hudson.model.AbstractBuild<?,?> owner)
Returns a file name for a temporary file that will hold the contents of the source. |
String |
getType()
Returns the annotation type. |
int |
hashCode()
|
boolean |
hasPackageName()
Returns whether a package name is defined for this annotation. |
static Collection<FileAnnotation> |
intern(Collection<FileAnnotation> annotations)
Let FileAnnotations share some of their internal data structure
to reduce memory footprint. |
void |
intern(TreeStringBuilder builder)
AbstractAnnotationParser can call this method to let
AbstractAnnotations to reduce their memory footprint by sharing
what they can share with other AbstractAnnotations. |
void |
setColumnPosition(int columnStart,
int columnEnd)
Sets the column position of this warning. |
void |
setContextHashCode(long contextHashCode)
Sets the context hash code to the specified value. |
void |
setFileName(String fileName)
Sets the file name to the specified value. |
void |
setModuleName(String moduleName)
Sets the module name to the specified value. |
void |
setOrigin(String origin)
Sets the origin of this annotation to the specified value. |
void |
setPackageName(String packageName)
Sets the package name to the specified value. |
void |
setPathName(String workspacePath)
Sets the pathname for this warning. |
void |
setPriority(Priority priority)
Sets the priority to the specified value. |
protected void |
superReadResolve()
Simply calls readResolve(). |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface hudson.plugins.analysis.util.model.FileAnnotation |
|---|
getToolTip |
| Field Detail |
|---|
public static final String WORKSPACE_FILES
| Constructor Detail |
|---|
public AbstractAnnotation(String message,
int start,
int end,
String category,
String type)
AbstractAnnotation.
message - the message of the warningstart - the first line of the line rangeend - the last line of the line rangecategory - the category of the annotationtype - the type of the annotation
public AbstractAnnotation(Priority priority,
String message,
int start,
int end,
String category,
String type)
AbstractAnnotation.
priority - the prioritymessage - the message of the warningstart - the first line of the line rangeend - the last line of the line rangecategory - the category of the annotationtype - the type of the annotationpublic AbstractAnnotation(AbstractAnnotation copy)
AbstractAnnotation.
copy - the annotation to copy the values from| Method Detail |
|---|
protected void superReadResolve()
readResolve().
public void intern(TreeStringBuilder builder)
AbstractAnnotationParser can call this method to let
AbstractAnnotations to reduce their memory footprint by sharing
what they can share with other AbstractAnnotations.
builder - caches previously used stringspublic static Collection<FileAnnotation> intern(Collection<FileAnnotation> annotations)
FileAnnotations share some of their internal data structure
to reduce memory footprint.
annotations - the annotations to compress
public void setColumnPosition(int columnStart,
int columnEnd)
columnStart - starting columncolumnEnd - ending columnpublic String getLinkName()
getLinkName in interface FileAnnotationpublic boolean hasPackageName()
hasPackageName in interface FileAnnotationtrue if this annotation has a package or namespace name,
false otherwisepublic void setPathName(String workspacePath)
setPathName in interface FileAnnotationworkspacePath - the workspace pathpublic String getPathName()
getPathName in interface FileAnnotationpublic String getOrigin()
getOrigin in interface FileAnnotationpublic void setOrigin(String origin)
origin - the value to setpublic void setPriority(Priority priority)
priority - the value to set@Exported public String getMessage()
getMessage in interface FileAnnotation@Exported public Priority getPriority()
getPriority in interface FileAnnotation@Exported public final long getKey()
getKey in interface FileAnnotation@Exported public final String getFileName()
getFileName in interface FileAnnotationpublic String getTempName(hudson.model.AbstractBuild<?,?> owner)
getTempName in interface FileAnnotationowner - the owner that provides the root directory where the files are
stored
public String getCategory()
getCategory in interface FileAnnotationpublic String getType()
getType in interface FileAnnotationpublic final void setFileName(String fileName)
setFileName in interface FileAnnotationfileName - the value to setpublic final String getModuleName()
getModuleName in interface FileAnnotationpublic final void setModuleName(String moduleName)
setModuleName in interface FileAnnotationmoduleName - the value to setpublic final String getPackageName()
getPackageName in interface FileAnnotationpublic final void setPackageName(String packageName)
packageName - the value to setpublic final Collection<LineRange> getLineRanges()
getLineRanges in interface FileAnnotation@Exported public final int getPrimaryLineNumber()
getPrimaryLineNumber in interface FileAnnotationpublic final int getLinkLineNumber()
public void addLineRange(LineRange lineRange)
lineRange - the line range to addpublic long getContextHashCode()
getContextHashCode in interface FileAnnotationpublic void setContextHashCode(long contextHashCode)
setContextHashCode in interface FileAnnotationcontextHashCode - the value to setpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic String getShortFileName()
getShortFileName in interface FileAnnotationpublic final boolean canDisplayFile(hudson.model.AbstractBuild<?,?> owner)
canDisplayFile in interface FileAnnotationowner - the owner that provides the root directory where the files are
stored
true, if successfulpublic int compareTo(FileAnnotation other)
compareTo in interface Comparable<FileAnnotation>public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||