Clover icon

sunshower-sdk

  1. Project Clover database Wed Apr 4 2018 21:39:43 UTC
  2. Package io.sunshower.sdk.v1.model.core.element

File MessageElement.java

 

Coverage histogram

../../../../../../../img/srcFileCovDistChart0.png
34% of files have more coverage

Code metrics

0
6
6
1
45
30
6
1
1
6
1

Classes

Class Line # Actions
MessageElement 11 6 6
0.00%
 

Contributing tests

No tests hitting this source file were found.

Source view

1    package io.sunshower.sdk.v1.model.core.element;
2   
3    import javax.xml.bind.annotation.XmlAnyElement;
4    import javax.xml.bind.annotation.XmlElement;
5    import javax.xml.bind.annotation.XmlRootElement;
6   
7    /**
8    * Created by haswell on 3/17/17.
9    */
10    @XmlRootElement(name = "message")
 
11    public class MessageElement<C> {
12   
13    @XmlElement(name = "contents")
14    private String message;
15   
16   
17    @XmlAnyElement(lax = true)
18    private Object payload;
19   
 
20  0 toggle public MessageElement() {
21   
22    }
23   
 
24  0 toggle public MessageElement(String message, Object payload) {
25  0 this.message = message;
26  0 this.payload = payload;
27    }
28   
 
29  0 toggle public String getMessage() {
30  0 return message;
31    }
32   
 
33  0 toggle public void setMessage(String message) {
34  0 this.message = message;
35    }
36   
 
37  0 toggle @SuppressWarnings("unchecked")
38    public C getPayload() {
39  0 return (C) payload;
40    }
41   
 
42  0 toggle public void setPayload(C payload) {
43  0 this.payload = payload;
44    }
45    }