org.jaitools.jiffle.parser
Class MessageTable

java.lang.Object
  extended by org.jaitools.jiffle.parser.MessageTable

public class MessageTable
extends java.lang.Object

Used by Jiffle parsers to record errors and warnings.

Since:
0.1
Version:
$Id: MessageTable.java 1653 2011-06-16 10:23:02Z michael.bedward $
Author:
Michael Bedward

Constructor Summary
MessageTable()
           
 
Method Summary
 void add(java.lang.String varName, Message code)
          Adds a message.
 java.util.Map<java.lang.String,java.util.List<Message>> getMessages()
          Gets all messages.
 boolean hasErrors()
          Checks if this table contains any error messages.
 boolean hasWarnings()
          Checks if this table contains any warning messages.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageTable

public MessageTable()
Method Detail

add

public void add(java.lang.String varName,
                Message code)
Adds a message.

Parameters:
varName - the variable that the message relates to
code - the message code

hasErrors

public boolean hasErrors()
Checks if this table contains any error messages.

Returns:
true if errors are present, false otherwise

hasWarnings

public boolean hasWarnings()
Checks if this table contains any warning messages.

Returns:
true if warnings are present, false otherwise

getMessages

public java.util.Map<java.lang.String,java.util.List<Message>> getMessages()
Gets all messages. The returned Map has variable names as keys and Lists of messages as values.

Returns:
all messages keyed by variable name


Copyright © 2011. All Rights Reserved.