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