Class 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 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 , null
        message - 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)
        Specified by:
        compareTo in interface java.lang.Comparable<Warning>
        Overrides:
        compareTo in class Warning
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class Warning
      • toString

        public abstract java.lang.String toString()
        Overrides:
        toString in class Warning