Class ErrorManager

java.lang.Object
fr.uga.pddl4j.parser.ErrorManager
All Implemented Interfaces:
Serializable

public class ErrorManager extends Object implements Serializable
This class implements the error manager used by the parser and java PDDL compiler.
See Also:
Serialized Form
  • Constructor Details

    • ErrorManager

      public ErrorManager()
      Creates a new error manager.
  • Method Details

    • print

      public void print(Message.Type type)
      Print the messages log in the error manager.
      Parameters:
      type - the type of message to print.
    • print

      public void print(File file)
      Print the messages log in the error manager that concerns a specific file.
      Parameters:
      file - The file.
    • print

      public void print(Message.Type type, File file)
      Print the messages log in the error manager of a specific and concerning a specific file.
      Parameters:
      type - the type of message to print.
      file - the file.
    • printAll

      public void printAll()
      Print the all the message of the error manager.
    • getMessages

      public Set<Message> getMessages()
      Returns the list of all messages from the error manager.
      Returns:
      The list of messages.
    • getMessages

      public Set<Message> getMessages(File file)
      Returns the list of messages that concerns a specific file.
      Parameters:
      file - The file.
      Returns:
      The list of messages.
    • getMessages

      public Set<Message> getMessages(Message.Type type, File file)
      Returns the list of messages of a specific type concerning a specific file.
      Parameters:
      type - The type of messages.
      file - The file.
      Returns:
      The list of messages of a specific type concerning a specific file.
    • getMessages

      public Set<Message> getMessages(Message.Type type)
      Returns the list of messages of a specific type.
      Parameters:
      type - The type of messages.
      Returns:
      The list of messages of a specific type
    • clear

      public void clear()
      Initialize the error manager.
    • isEmpty

      public boolean isEmpty()
      Returns if the error manager is empty, i.e., contains no message of any type.
      Returns:
      true if the error manager is empty; false otherwise.
    • logParserError

      public void logParserError(String msg, File file, int line, int column)
      Log an error message to the current print stream.
      Parameters:
      msg - the error message.
      file - the file where the warning was encoutered.
      line - the line of the error.
      column - the column of the error.
    • logLexicalError

      public void logLexicalError(String msg, File file, int line, int column)
      Log an lexical error message.
      Parameters:
      msg - the error message.
      file - the file where the error was encoutered.
      line - the line of the error.
      column - the column of the error.
    • logParserWarning

      public void logParserWarning(String msg, File file, int line, int column)
      Log a warning message to the current print stream.
      Parameters:
      msg - the warning message.
      file - the file where the warning was encoutered.
      line - the line of the warning.
      column - the column of the warning.