Last change
on this file since 193 was
193,
checked in by Maciej Komosinski, 10 years ago
|
Set svn:eol-style native for all textual files
|
-
Property svn:eol-style set to
native
|
File size:
971 bytes
|
Line | |
---|
1 | package com.framsticks.structure.messages; |
---|
2 | |
---|
3 | import com.framsticks.params.annotations.FramsClassAnnotation; |
---|
4 | import com.framsticks.params.annotations.ParamAnnotation; |
---|
5 | |
---|
6 | @FramsClassAnnotation(id = "Msg", name = "Msg") |
---|
7 | public 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.