Class Problem


  • public class Problem
    extends Object
    During the parsing of code, problems can occur which can be wrapped inside a object with this class.
    Author:
    George Gastaldi
    • Constructor Detail

      • Problem

        public Problem​(String message,
                       int sourceStart,
                       int sourceEnd,
                       int sourceLineNumber)
        Constructs a new Problem with the given attributes.
        Parameters:
        message - the message of this problem in a human readable form
        sourceStart - the start position of the problem
        sourceEnd - the end position of the problem
        sourceLineNumber - the source line number of the start of the problem
    • Method Detail

      • getMessage

        public String getMessage()
        Returns the message of this problem.
        Returns:
        the message
      • getSourceStart

        public int getSourceStart()
        Returns the start position of this problem or -1 if unknown.
        Returns:
        the start position
      • getSourceEnd

        public int getSourceEnd()
        Returns the end position of this problem or -1 if unknown.
        Returns:
        the end position
      • getSourceLineNumber

        public int getSourceLineNumber()
        Returns the source line number of the start of the problem.
        Returns:
        the source line number
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object