Package it.unive.lisa.checks.warnings
Class WarningWithLocation
- java.lang.Object
-
- it.unive.lisa.checks.warnings.Warning
-
- it.unive.lisa.checks.warnings.WarningWithLocation
-
- All Implemented Interfaces:
java.lang.Comparable<Warning>
- Direct Known Subclasses:
CFGDescriptorWarning,CFGWarning,GlobalWarning,StatementWarning,UnitWarning
public abstract class WarningWithLocation extends Warning
A warning reported by LiSA on the program under analysis. This warning is tied to a location, i.e. it might have information about source file, line number and column. This does not mean that it will always have them, since CFGs and statements might have been built without that information.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedWarningWithLocation(CodeLocation location, java.lang.String message)Builds the warning.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intcompareTo(Warning o)booleanequals(java.lang.Object obj)java.lang.StringgetLocation()Yields the location where this warning was reported.java.lang.StringgetLocationWithBrackets()Yields the location where this warning was reported, surrounded by square brackets.inthashCode()abstract java.lang.StringtoString()-
Methods inherited from class it.unive.lisa.checks.warnings.Warning
getMessage, getTag, getTaggedMessage
-
-
-
-
Constructor Detail
-
WarningWithLocation
protected WarningWithLocation(CodeLocation location, java.lang.String message)
Builds the warning.- Parameters:
location- the location in the source file where this warning is located. If unknown, use, nullmessage- the message of this warning
-
-
Method Detail
-
getLocation
public final java.lang.String getLocation()
Yields the location where this warning was reported.- Returns:
- the location of this warning
-
getLocationWithBrackets
public final java.lang.String getLocationWithBrackets()
Yields the location where this warning was reported, surrounded by square brackets.- Returns:
- the location of this warning surrounded by brackets
-
compareTo
public int compareTo(Warning o)
-
-