Package fr.uga.pddl4j.parser
Class ErrorManager
java.lang.Object
fr.uga.pddl4j.parser.ErrorManager
- All Implemented Interfaces:
Serializable
This class implements the error manager used by the parser and java PDDL compiler.
- See Also:
- Serialized Form
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Initialize the error manager.Returns the list of all messages from the error manager.getMessages(Message.Type type)
Returns the list of messages of a specific type.getMessages(Message.Type type, File file)
Returns the list of messages of a specific type concerning a specific file.getMessages(File file)
Returns the list of messages that concerns a specific file.boolean
isEmpty()
Returns if the error manager is empty, i.e., contains no message of any type.void
logLexicalError(String msg, File file, int line, int column)
Log an lexical error message.void
logParserError(String msg, File file, int line, int column)
Log an error message to the current print stream.void
logParserWarning(String msg, File file, int line, int column)
Log a warning message to the current print stream.void
print(Message.Type type)
Print the messages log in the error manager.void
print(Message.Type type, File file)
Print the messages log in the error manager of a specific and concerning a specific file.void
Print the messages log in the error manager that concerns a specific file.void
printAll()
Print the all the message of the error manager.
-
Constructor Details
-
ErrorManager
public ErrorManager()Creates a new error manager.
-
-
Method Details
-
print
Print the messages log in the error manager.- Parameters:
type
- the type of message to print.
-
print
Print the messages log in the error manager that concerns a specific file.- Parameters:
file
- The file.
-
print
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
Returns the list of all messages from the error manager.- Returns:
- The list of messages.
-
getMessages
Returns the list of messages that concerns a specific file.- Parameters:
file
- The file.- Returns:
- The list of messages.
-
getMessages
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
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
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
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
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.
-