Class Problem


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

      Constructors 
      Constructor Description
      Problem​(java.lang.String message, int sourceStart, int sourceEnd, int sourceLineNumber)
      Constructs a new Problem with the given attributes.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      java.lang.String getMessage()
      Returns the message of this problem.
      int getSourceEnd()
      Returns the end position of this problem or -1 if unknown.
      int getSourceLineNumber()
      Returns the source line number of the start of the problem.
      int getSourceStart()
      Returns the start position of this problem or -1 if unknown.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Problem

        public Problem​(java.lang.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 java.lang.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 java.lang.Object
      • equals

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

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