java.lang.Object
edu.hm.hafner.analysis.Issue
- Alle implementierten Schnittstellen:
Serializable
An issue reported by a static analysis tool. Use the provided
builder to create new instances.- Autor:
- Ullrich Hafner
- Siehe auch:
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungbyCategory(String category) Returns a predicate that checks if the category of an issue is equal to the specified category.byFileName(String fileName) Returns a predicate that checks if the file name of an issue is equal to the specified file name.Returns a predicate that checks if the folder of an issue is equal to the specified folder.byModuleName(String moduleName) Returns a predicate that checks if the module name of an issue is equal to the specified module name.Returns a predicate that checks if the origin of an issue is equal to the specified origin.byPackageName(String packageName) Returns a predicate that checks if the package name of an issue is equal to the specified package name.bySeverity(Severity severity) Returns a predicate that checks if the severity of an issue is equal to the specified severity.Returns a predicate that checks if the type of an issue is equal to the specified type.booleanReturns the absolute path of the affected file.Returns additional properties for this issue.Returns the base name of the file that contains this issue (i.e. the file name without the full path).Returns the category of this issue (depends on the available categories of the static analysis tool).intReturns the last column of this issue (columns start at 1).intReturns the first column of this issue (columns start at 1, 0 indicates the whole line).Returns an additional description for this issue.Returns the name of the affected file.Returns the fingerprint for this issue.Returns the folder that contains the affected file of this issue.getId()Returns the unique ID of this issue.intReturns the last line of this issue (lines start at 1).Returns additional line ranges for this issue.intReturns the first line of this issue (lines start at 1; 0 indicates the whole file).Returns the detailed message for this issue.Returns the name of the module or project (or similar concept) that contains this issue.Returns the ID of the tool that did report this issue.Returns the name of the tool that did report this issue.Returns the name of the package or name space (or similar concept) that contains this issue.getPath()Returns the path of the affected file.static StringgetPropertyValueAsString(Issue issue, String propertyName) Returns the value of the property with the specified name for a given issue instance.getPropertyValueGetter(String propertyName) Returns a function that can dynamically obtain the value of the property with the specified name of an issue instance.Returns a reference to the execution of the static analysis tool (build ID, timestamp, etc.).Returns the severity of this issue.getType()Returns the type of this issue (depends on the available types of the static analysis tool).booleanReturns whether this issue has a file name set.booleanReturns whether this issue already has a fingerprint set.inthashCode()booleanReturns whether this issue has a module name set.booleanReturns whether this issue has a package name set.protected ObjectCalled after de-serialization to improve the memory usage.voidSets the ID of the tool that did report this issue.voidSets the ID and the name of the tool that did report this issue.voidsetReference(String reference) Sets a reference to the execution of the static analysis tool (build ID, timestamp, etc.).toString()
-
Methodendetails
-
getPropertyValueAsString
Returns the value of the property with the specified name for a given issue instance.- Parameter:
issue- the issue to get the property forpropertyName- the name of the property- Gibt zurück:
- the function that obtains the value
-
getPropertyValueGetter
Returns a function that can dynamically obtain the value of the property with the specified name of an issue instance.- Parameter:
propertyName- the name of the property- Gibt zurück:
- the function that obtains the value
-
byPackageName
Returns a predicate that checks if the package name of an issue is equal to the specified package name.- Parameter:
packageName- the package name to match- Gibt zurück:
- the predicate
-
byModuleName
Returns a predicate that checks if the module name of an issue is equal to the specified module name.- Parameter:
moduleName- the module name to match- Gibt zurück:
- the predicate
-
byFileName
Returns a predicate that checks if the file name of an issue is equal to the specified file name.- Parameter:
fileName- the file name to match- Gibt zurück:
- the predicate
-
byFolder
Returns a predicate that checks if the folder of an issue is equal to the specified folder.- Parameter:
folder- the folder to match- Gibt zurück:
- the predicate
-
bySeverity
Returns a predicate that checks if the severity of an issue is equal to the specified severity.- Parameter:
severity- the severity to match- Gibt zurück:
- the predicate
-
byCategory
Returns a predicate that checks if the category of an issue is equal to the specified category.- Parameter:
category- the category to match- Gibt zurück:
- the predicate
-
byOrigin
Returns a predicate that checks if the origin of an issue is equal to the specified origin.- Parameter:
origin- the origin to match- Gibt zurück:
- the predicate
-
byType
Returns a predicate that checks if the type of an issue is equal to the specified type.- Parameter:
type- the type to match- Gibt zurück:
- the predicate
-
readResolve
Called after de-serialization to improve the memory usage.- Gibt zurück:
- this
-
getId
Returns the unique ID of this issue.- Gibt zurück:
- the unique ID
-
getFileName
Returns the name of the affected file. This file name is a path relative to the path of the affected files (returned bygetPath()).- Gibt zurück:
- the name of the file that contains this issue
- Siehe auch:
-
getFolder
Returns the folder that contains the affected file of this issue. Note that this path is not an absolute path, it is relative to the path of the affected files (returned bygetPath()).- Gibt zurück:
- the folder of the file that contains this issue
-
getBaseName
Returns the base name of the file that contains this issue (i.e. the file name without the full path).- Gibt zurück:
- the base name of the file that contains this issue
-
getAbsolutePath
Returns the absolute path of the affected file.- Gibt zurück:
- the base name of the file that contains this issue
-
getPath
Returns the path of the affected file. Note that this path is not the parent folder of the affected file. This path is the folder that contains all of the affected files of aReport. If this path is not defined, then the default valueUNDEFINEDis returned.- Gibt zurück:
- the base name of the file that contains this issue
-
hasFileName
public boolean hasFileName()Returns whether this issue has a file name set.- Gibt zurück:
trueif this issue has a file name set- Siehe auch:
-
getCategory
Returns the category of this issue (depends on the available categories of the static analysis tool). Examples for categories are "Deprecation", "Design", or "JavaDoc".- Gibt zurück:
- the category
-
getType
Returns the type of this issue (depends on the available types of the static analysis tool). The type typically is the associated rule of the static analysis tool that reported this issue.- Gibt zurück:
- the type
-
getSeverity
Returns the severity of this issue.- Gibt zurück:
- the severity
-
getMessage
Returns the detailed message for this issue.- Gibt zurück:
- the message
-
getDescription
Returns an additional description for this issue. Static analysis tools might provide some additional information about this issue. This description may contain valid HTML.- Gibt zurück:
- the description
-
getLineStart
public int getLineStart()Returns the first line of this issue (lines start at 1; 0 indicates the whole file).- Gibt zurück:
- the first line
-
getLineEnd
public int getLineEnd()Returns the last line of this issue (lines start at 1).- Gibt zurück:
- the last line
-
getLineRanges
Returns additional line ranges for this issue. Not that the primary range given bylineStartandlineEndis not included.- Gibt zurück:
- the last line
-
getColumnStart
public int getColumnStart()Returns the first column of this issue (columns start at 1, 0 indicates the whole line).- Gibt zurück:
- the first column
-
getColumnEnd
public int getColumnEnd()Returns the last column of this issue (columns start at 1).- Gibt zurück:
- the last column
-
getPackageName
Returns the name of the package or name space (or similar concept) that contains this issue.- Gibt zurück:
- the package name
-
hasPackageName
public boolean hasPackageName()Returns whether this issue has a package name set.- Gibt zurück:
trueif this issue has a package name set- Siehe auch:
-
getModuleName
Returns the name of the module or project (or similar concept) that contains this issue.- Gibt zurück:
- the module
-
hasModuleName
public boolean hasModuleName()Returns whether this issue has a module name set.- Gibt zurück:
trueif this issue has a module name set- Siehe auch:
-
getOrigin
Returns the ID of the tool that did report this issue.- Gibt zurück:
- the ID of the origin
-
getOriginName
Returns the name of the tool that did report this issue.- Gibt zurück:
- the name of the origin
-
setOrigin
Sets the ID of the tool that did report this issue.- Parameter:
origin- the origin
-
setOrigin
Sets the ID and the name of the tool that did report this issue.- Parameter:
originId- the ID of the originname- the name of the origin
-
getReference
Returns a reference to the execution of the static analysis tool (build ID, timestamp, etc.).- Gibt zurück:
- the reference
-
setReference
Sets a reference to the execution of the static analysis tool (build ID, timestamp, etc.). This property should not be set by parsers as it is overwritten by thedifferencing enginewhile computing new and fixed issues.- Parameter:
reference- the reference
-
getFingerprint
Returns the fingerprint for this issue. Used to decide if two issues are equal even if the equals method returnsfalsesince some of the properties differ due to code refactorings. The fingerprint is created by analyzing the content of the affected file.Note: the fingerprint is not part of the equals method since the fingerprint might change due to an unrelated refactoring of the source code.
- Gibt zurück:
- the fingerprint of this issue
-
hasFingerprint
public boolean hasFingerprint()Returns whether this issue already has a fingerprint set.- Gibt zurück:
trueif this issue already has a fingerprint set
-
getAdditionalProperties
Returns additional properties for this issue. A static analysis tool may store additional properties in this untyped object. This object will be serialized and is used inequalsandhashCode.- Gibt zurück:
- the additional properties
-
equals
-
hashCode
public int hashCode() -
toString
-