1 |
| |
2 |
| |
3 |
| |
4 |
| |
5 |
| |
6 |
| |
7 |
| package net.sourceforge.pmd.jsp.ast; |
8 |
| |
9 |
| |
10 |
| |
11 |
| |
12 |
| |
13 |
| |
14 |
| |
15 |
| public class StartAndEndTagMismatchException extends SyntaxErrorException { |
16 |
| |
17 |
| public static final String START_END_TAG_MISMATCH_RULE_NAME |
18 |
| = "Start and End Tags of an XML Element must match."; |
19 |
| |
20 |
| private int startLine, endLine, startColumn, endColumn; |
21 |
| private String startTagName, endTagName; |
22 |
| |
23 |
| |
24 |
| |
25 |
| |
26 |
| |
27 |
| |
28 |
| |
29 |
| |
30 |
| |
31 |
| |
32 |
| |
33 |
0
| public StartAndEndTagMismatchException(int startLine, int startColumn, String startTagName,
|
34 |
| int endLine, int endColumn, String endTagName) { |
35 |
0
| super(endLine, START_END_TAG_MISMATCH_RULE_NAME);
|
36 |
0
| this.startLine = startLine;
|
37 |
0
| this.startColumn = startColumn;
|
38 |
0
| this.startTagName = startTagName;
|
39 |
| |
40 |
0
| this.endLine = endLine;
|
41 |
0
| this.endColumn = endColumn;
|
42 |
0
| this.endTagName = endTagName;
|
43 |
| } |
44 |
| |
45 |
| |
46 |
| |
47 |
| |
48 |
| |
49 |
0
| public int getEndColumn() {
|
50 |
0
| return endColumn;
|
51 |
| } |
52 |
| |
53 |
| |
54 |
| |
55 |
| |
56 |
0
| public int getEndLine() {
|
57 |
0
| return endLine;
|
58 |
| } |
59 |
| |
60 |
| |
61 |
| |
62 |
| |
63 |
0
| public int getStartColumn() {
|
64 |
0
| return startColumn;
|
65 |
| } |
66 |
| |
67 |
| |
68 |
| |
69 |
| |
70 |
0
| public int getStartLine() {
|
71 |
0
| return startLine;
|
72 |
| } |
73 |
| |
74 |
| |
75 |
| |
76 |
| |
77 |
0
| public String getMessage() {
|
78 |
0
| return "The start-tag of element \"" + startTagName + "\" (line "
|
79 |
| + startLine + ", column " + startColumn |
80 |
| + ") does not correspond to the end-tag found: \"" |
81 |
| + endTagName + "\" (line " + endLine |
82 |
| + ", column " + endColumn + ")."; |
83 |
| } |
84 |
| } |