net.sf.clirr.core
Class Message

java.lang.Object
  extended by net.sf.clirr.core.Message

public final class Message
extends java.lang.Object

Class which manages API Difference messages, including expanding message codes into strings and descriptions.


Constructor Summary
Message(int id)
          This constructor is equivalent to new Message(id, true).
Message(int id, boolean register)
          Create an instance of this object with the specified message id
 
Method Summary
 int getId()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Message

public Message(int id)
This constructor is equivalent to new Message(id, true).


Message

public Message(int id,
               boolean register)
Create an instance of this object with the specified message id

Parameters:
id - is an integer which is used to look up the appropriate text string for this message from a resource file. The id of a message should be unique.
register - determines whether the new Message object should be registered with the central MessageManager object. This is normally desirable, as this allows the unit tests associated with clirr to verify that message ids are unique and that translations exist for all registered messages. However false can be useful in some circumstances, eg when creating Message objects for the purposes of unit tests.
Method Detail

getId

public int getId()

toString

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


Copyright © 2003-2005 Lars Kühne. All Rights Reserved.