Coverage Report - org.mule.config.i18n.Message
 
Classes in this File Line Coverage Branch Coverage Complexity
Message
77%
10/13
100%
2/2
1
 
 1  
 /*
 2  
  * $Id: Message.java 8077 2007-08-27 20:15:25Z aperepel $
 3  
  * --------------------------------------------------------------------------------------
 4  
  * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
 5  
  *
 6  
  * The software in this package is published under the terms of the CPAL v1.0
 7  
  * license, a copy of which has been included with this distribution in the
 8  
  * LICENSE.txt file.
 9  
  */
 10  
 
 11  
 package org.mule.config.i18n;
 12  
 
 13  
 import java.io.Serializable;
 14  
 
 15  
 public class Message implements Serializable
 16  
 {
 17  
     /**
 18  
      * Serial version
 19  
      */
 20  
     private static final long serialVersionUID = -6109760447384477924L;
 21  
 
 22  
     private String message;
 23  1478
     private int code = 0;
 24  
     private Object[] args;
 25  
     private Message nextMessage;
 26  
 
 27  
     protected Message(String message, int code, Object[] args)
 28  
     {
 29  1478
         super();
 30  1478
         this.message = message;
 31  1478
         this.code = code;
 32  1478
         this.args = args;
 33  1478
     }
 34  
 
 35  
     public int getCode()
 36  
     {
 37  0
         return code;
 38  
     }
 39  
 
 40  
     public Object[] getArgs()
 41  
     {
 42  0
         return args;
 43  
     }
 44  
 
 45  
     public String getMessage()
 46  
     {
 47  1460
         return message + (nextMessage != null ? ". " + nextMessage.getMessage() : "");
 48  
     }
 49  
 
 50  
     public Message setNextMessage(Message nextMessage)
 51  
     {
 52  6
         this.nextMessage = nextMessage;
 53  6
         return this;
 54  
     }
 55  
 
 56  
     public Message getNextMessage()
 57  
     {
 58  0
         return nextMessage;
 59  
     }
 60  
 
 61  
     public String toString()
 62  
     {
 63  94
         return this.getMessage();
 64  
     }
 65  
 }