Package it.unive.lisa.checks.warnings
Class StatementWarning
- java.lang.Object
-
- it.unive.lisa.checks.warnings.Warning
-
- it.unive.lisa.checks.warnings.WarningWithLocation
-
- it.unive.lisa.checks.warnings.StatementWarning
-
- All Implemented Interfaces:
java.lang.Comparable<Warning>
- Direct Known Subclasses:
ExpressionWarning
public class StatementWarning extends WarningWithLocation
A warning reported by LiSA on a statement.
-
-
Constructor Summary
Constructors Constructor Description StatementWarning(Statement statement, java.lang.String message)
Builds the warning.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Warning o)
boolean
equals(java.lang.Object obj)
Statement
getStatement()
Yields the statement where this warning was reported on.java.lang.String
getTag()
Yields the tag of this warning.int
hashCode()
java.lang.String
toString()
-
Methods inherited from class it.unive.lisa.checks.warnings.WarningWithLocation
getLocation, getLocationWithBrackets
-
Methods inherited from class it.unive.lisa.checks.warnings.Warning
getMessage, getTaggedMessage
-
-
-
-
Constructor Detail
-
StatementWarning
public StatementWarning(Statement statement, java.lang.String message)
Builds the warning.- Parameters:
statement
- the statement where this warning was reported onmessage
- the message of this warning
-
-
Method Detail
-
getStatement
public Statement getStatement()
Yields the statement where this warning was reported on.- Returns:
- the statement
-
compareTo
public int compareTo(Warning o)
- Specified by:
compareTo
in interfacejava.lang.Comparable<Warning>
- Overrides:
compareTo
in classWarningWithLocation
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classWarningWithLocation
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classWarningWithLocation
-
getTag
public java.lang.String getTag()
Description copied from class:Warning
Yields the tag of this warning.
-
toString
public java.lang.String toString()
- Specified by:
toString
in classWarningWithLocation
-
-