01: package org.mvel;
02:
03: public class ErrorDetail {
04: private int row;
05: private int col;
06: private boolean critical;
07: private String message;
08:
09: public ErrorDetail(String message, boolean critical) {
10: this .message = message;
11: this .critical = critical;
12: }
13:
14: public ErrorDetail(int row, int col, boolean critical,
15: String message) {
16: this .row = row;
17: this .col = col;
18: this .critical = critical;
19: this .message = message;
20: }
21:
22: public int getRow() {
23: return row;
24: }
25:
26: public void setRow(int row) {
27: this .row = row;
28: }
29:
30: public int getCol() {
31: return col;
32: }
33:
34: public void setCol(int col) {
35: this .col = col;
36: }
37:
38: public boolean isCritical() {
39: return critical;
40: }
41:
42: public void setCritical(boolean critical) {
43: this .critical = critical;
44: }
45:
46: public String getMessage() {
47: return message;
48: }
49:
50: public void setMessage(String message) {
51: this .message = message;
52: }
53:
54: public String toString() {
55: if (critical) {
56: return "(" + row + "," + col + ") " + message;
57: } else {
58: return "(" + row + "," + col + ") WARNING: " + message;
59: }
60:
61: }
62: }
|