Class CompilerMessage


  • public class CompilerMessage
    extends java.lang.Object
    Messages are passed to compiler listeners when the compiler wishes to say something.
    • Constructor Detail

      • CompilerMessage

        public CompilerMessage​(CompilerMessage.MessageType messageType,
                               java.lang.String message,
                               int line,
                               int column)
        This constructor creates the Message object. Messages are created by compiler.
        Parameters:
        messageType - Type of the message.
        message - Text of the message
        line - Line in the source code
        column - Column in the source code
      • CompilerMessage

        public CompilerMessage​(java.lang.String message)
        This constructor creates the Message object. Messages are created by compiler.
        Parameters:
        message - Text of the message
      • CompilerMessage

        public CompilerMessage​(CompilerMessage.MessageType type,
                               java.lang.String message)
        This constructor creates the Message object. Messages are created by compiler.
        Parameters:
        type - Type of the message.
        message - Text of the message
    • Method Detail

      • getFormattedMessage

        public java.lang.String getFormattedMessage()
        Return formatted string that represents this Message object.
        Returns:
        formatted message
      • getLine

        public int getLine()
        Get line of the source code that the message belongs to.
        Returns:
        the line, starting from 0. Negative values indicate that this value is not valid.
      • getColumn

        public int getColumn()
        Get column of the source code that the message belongs to.
        Returns:
        the column, starting from 0. Negative values indicate that this value is not valid.
      • getMessage

        public java.lang.String getMessage()
        Get the text of the message.
        Returns:
        text of the message
      • toString

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