source: java/main/src/main/java/com/framsticks/structure/messages/Message.java @ 106

Last change on this file since 106 was 106, checked in by psniegowski, 11 years ago

Add directory left over during last commit.

File size: 971 bytes
Line 
1package com.framsticks.structure.messages;
2
3import com.framsticks.params.annotations.FramsClassAnnotation;
4import com.framsticks.params.annotations.ParamAnnotation;
5
6@FramsClassAnnotation(id = "Msg", name = "Msg")
7public class Message {
8
9        @ParamAnnotation(id = "class", name = "class")
10        public String className;
11
12        @ParamAnnotation
13        public String function;
14
15        @ParamAnnotation
16        public String message;
17
18        @ParamAnnotation
19        public int level;
20
21        /**
22         *
23         */
24        public Message() {
25        }
26
27
28        /**
29         * @param function
30         * @param message
31         * @param level
32         */
33        public Message(String className, String function, String message, int level) {
34                this.className = className;
35                this.function = function;
36                this.message = message;
37                this.level = level;
38        }
39
40        @Override
41        public String toString() {
42                StringBuilder b = new StringBuilder();
43                b.append("[").append(level).append("] ");
44                b.append(className).append(".").append(function);
45                b.append(": ").append(message);
46                return b.toString();
47        }
48}
Note: See TracBrowser for help on using the repository browser.