public class Issue extends Object implements Serializable
builder to create new instances.| Modifier | Constructor and Description |
|---|---|
protected |
Issue(Issue copy)
Creates a new instance of
Issue using the properties of the other issue instance. |
protected |
Issue(String fileName,
int lineStart,
int lineEnd,
int columnStart,
int columnEnd,
LineRangeList lineRanges,
String category,
String type,
String packageName,
String moduleName,
Severity severity,
String message,
String description,
String origin,
String reference,
String fingerprint,
Serializable additionalProperties)
Creates a new instance of
Issue using the specified properties. |
protected |
Issue(String fileName,
int lineStart,
int lineEnd,
int columnStart,
int columnEnd,
LineRangeList lineRanges,
String category,
String type,
String packageName,
String moduleName,
Severity severity,
String message,
String description,
String origin,
String reference,
String fingerprint,
Serializable additionalProperties,
UUID id)
Creates a new instance of
Issue using the specified properties. |
| Modifier and Type | Method and Description |
|---|---|
static Predicate<Issue> |
byCategory(String category)
Returns a predicate that checks if the category of an issue is equal to the specified category.
|
static Predicate<Issue> |
byFileName(String fileName)
Returns a predicate that checks if the file name of an issue is equal to the specified file name.
|
static Predicate<Issue> |
byModuleName(String moduleName)
Returns a predicate that checks if the module name of an issue is equal to the specified module name.
|
static Predicate<Issue> |
byOrigin(String origin)
Returns a predicate that checks if the origin of an issue is equal to the specified origin.
|
static Predicate<Issue> |
byPackageName(String packageName)
Returns a predicate that checks if the package name of an issue is equal to the specified package name.
|
static Predicate<Issue> |
bySeverity(Severity severity)
Returns a predicate that checks if the severity of an issue is equal to the specified severity.
|
static Predicate<Issue> |
byType(String type)
Returns a predicate that checks if the type of an issue is equal to the specified type.
|
boolean |
equals(Object o) |
Serializable |
getAdditionalProperties()
Returns additional properties for this issue.
|
String |
getBaseName()
Returns the base name of the file that contains this issue (i.e. the file name without the full path).
|
String |
getCategory()
Returns the category of this issue (depends on the available categories of the static analysis tool).
|
int |
getColumnEnd()
Returns the last column of this issue (columns start at 1).
|
int |
getColumnStart()
Returns the first column of this issue (columns start at 1, 0 indicates the whole line).
|
String |
getDescription()
Returns an additional description for this issue.
|
String |
getFileName()
Returns the name of the file that contains this issue.
|
String |
getFingerprint()
Returns the finger print for this issue.
|
UUID |
getId()
Returns the unique ID of this issue.
|
int |
getLineEnd()
Returns the last line of this issue (lines start at 1).
|
LineRangeList |
getLineRanges()
Returns additional line ranges for this issue.
|
int |
getLineStart()
Returns the first line of this issue (lines start at 1; 0 indicates the whole file).
|
String |
getMessage()
Returns the detailed message for this issue.
|
String |
getModuleName()
Returns the name of the module or project (or similar concept) that contains this issue.
|
String |
getOrigin()
Returns the ID of the tool that did report this issue.
|
String |
getPackageName()
Returns the name of the package or name space (or similar concept) that contains this issue.
|
static String |
getPropertyValueAsString(Issue issue,
String propertyName)
Returns the value of the property with the specified name for a given issue instance.
|
static Function<Issue,String> |
getPropertyValueGetter(String propertyName)
Returns a function that can dynamically obtain the value of the property with the specified name of an issue
instance.
|
String |
getReference()
Returns a reference to the execution of the static analysis tool (build ID, timestamp, etc.).
|
Severity |
getSeverity()
Returns the severity of this issue.
|
String |
getType()
Returns the type of this issue (depends on the available types of the static analysis tool).
|
boolean |
hasFileName()
Returns whether this issue has a file name set.
|
boolean |
hasFingerprint()
Returns whether this issue already has a fingerprint set.
|
int |
hashCode() |
boolean |
hasModuleName()
Returns whether this issue has a module name set.
|
boolean |
hasPackageName()
Returns whether this issue has a package name set.
|
protected Object |
readResolve()
Called after de-serialization to improve the memory usage.
|
void |
setFileName(String fileName)
Sets the name of the file that contains this issue.
|
void |
setFingerprint(String fingerprint)
Sets the finger print for this issue to the given value.
|
void |
setModuleName(String moduleName)
Sets the the name of the module or project (or similar concept) that contains this issue.
|
void |
setOrigin(String origin)
Sets the ID of the tool that did report this issue.
|
void |
setPackageName(String packageName)
Sets the name of the package or name space (or similar concept) that contains this issue.
|
void |
setReference(String reference)
Sets a reference to the execution of the static analysis tool (build ID, timestamp, etc.).
|
String |
toString() |
protected Issue(Issue copy)
Issue using the properties of the other issue instance. The new issue has the
same ID as the copy.copy - the other issue to copy the properties fromprotected Issue(@CheckForNull
String fileName,
int lineStart,
int lineEnd,
int columnStart,
int columnEnd,
@CheckForNull
LineRangeList lineRanges,
@CheckForNull
String category,
@CheckForNull
String type,
@CheckForNull
String packageName,
@CheckForNull
String moduleName,
@CheckForNull
Severity severity,
@CheckForNull
String message,
@CheckForNull
String description,
@CheckForNull
String origin,
@CheckForNull
String reference,
@CheckForNull
String fingerprint,
@CheckForNull
Serializable additionalProperties)
Issue using the specified properties. The new issue will get a new generated
ID.fileName - the name of the file that contains this issuelineStart - the first line of this issue (lines start at 1; 0 indicates the whole file)lineEnd - the last line of this issue (lines start at 1)columnStart - the first column of this issue (columns start at 1, 0 indicates the whole line)columnEnd - the last column of this issue (columns start at 1)lineRanges - additional line ranges of this issuecategory - the category of this issue (depends on the available categories of the static analysis tool)type - the type of this issue (depends on the available types of the static analysis tool)packageName - the name of the package (or name space) that contains this issuemoduleName - the name of the moduleName (or project) that contains this issueseverity - the severity of this issuemessage - the detail message of this issuedescription - the description for this issueorigin - the ID of the tool that did report this issuereference - an arbitrary reference to the execution of the static analysis tool (build ID, timestamp, etc.)fingerprint - the finger print for this issueadditionalProperties - additional properties from the statical analysis toolprotected Issue(@CheckForNull
String fileName,
int lineStart,
int lineEnd,
int columnStart,
int columnEnd,
@CheckForNull
LineRangeList lineRanges,
@CheckForNull
String category,
@CheckForNull
String type,
@CheckForNull
String packageName,
@CheckForNull
String moduleName,
@CheckForNull
Severity severity,
@CheckForNull
String message,
@CheckForNull
String description,
@CheckForNull
String origin,
@CheckForNull
String reference,
@CheckForNull
String fingerprint,
@CheckForNull
Serializable additionalProperties,
UUID id)
Issue using the specified properties.fileName - the name of the file that contains this issuelineStart - the first line of this issue (lines start at 1; 0 indicates the whole file)lineEnd - the last line of this issue (lines start at 1)columnStart - the first column of this issue (columns start at 1, 0 indicates the whole line)columnEnd - the last column of this issue (columns start at 1)lineRanges - additional line ranges of this issuecategory - the category of this issue (depends on the available categories of the static analysis tool)type - the type of this issue (depends on the available types of the static analysis tool)packageName - the name of the package (or name space) that contains this issuemoduleName - the name of the moduleName (or project) that contains this issueseverity - the severity of this issuemessage - the detail message of this issuedescription - the description for this issueorigin - the ID of the tool that did report this issuereference - an arbitrary reference to the execution of the static analysis tool (build ID, timestamp, etc.)fingerprint - the finger print for this issueadditionalProperties - additional properties from the statical analysis toolid - the ID of this issuepublic static String getPropertyValueAsString(Issue issue, String propertyName)
issue - the issue to get the property forpropertyName - the name of the propertypublic static Function<Issue,String> getPropertyValueGetter(String propertyName)
propertyName - the name of the propertypublic static Predicate<Issue> byPackageName(String packageName)
packageName - the package name to matchpublic static Predicate<Issue> byModuleName(String moduleName)
moduleName - the module name to matchpublic static Predicate<Issue> byFileName(String fileName)
fileName - the file name to matchpublic static Predicate<Issue> bySeverity(Severity severity)
severity - the severity to matchpublic static Predicate<Issue> byCategory(String category)
category - the category to matchpublic static Predicate<Issue> byOrigin(String origin)
origin - the origin to matchpublic static Predicate<Issue> byType(String type)
type - the type to matchprotected Object readResolve()
public UUID getId()
public String getFileName()
public String getBaseName()
public void setFileName(@CheckForNull
String fileName)
fileName - the file name to setpublic boolean hasFileName()
true if this issue has a file name setgetFileName()public String getCategory()
public String getType()
public Severity getSeverity()
public String getMessage()
public String getDescription()
public int getLineStart()
public int getLineEnd()
public LineRangeList getLineRanges()
lineStart and lineEnd is not included.public int getColumnStart()
public int getColumnEnd()
public String getPackageName()
public void setPackageName(@CheckForNull
String packageName)
packageName - the name of the packagepublic boolean hasPackageName()
true if this issue has a package name setgetPackageName()public String getModuleName()
public void setModuleName(@CheckForNull
String moduleName)
moduleName - the module name to setpublic boolean hasModuleName()
true if this issue has a module name setgetModuleName()public String getOrigin()
public void setOrigin(String origin)
origin - the originpublic String getReference()
public void setReference(@CheckForNull
String reference)
reference - the referencepublic String getFingerprint()
false since 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.
public void setFingerprint(@CheckForNull
String fingerprint)
fingerprint - the fingerprint to setgetFingerprint()public boolean hasFingerprint()
true if this issue already has a fingerprint set@CheckForNull public Serializable getAdditionalProperties()
equals and hashCode.Copyright © 2018. All rights reserved.