1 7 package net.sourceforge.pmd.jsp.ast; 8 9 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 33 public StartAndEndTagMismatchException(int startLine, int startColumn, String startTagName, 34 int endLine, int endColumn, String endTagName) { 35 super(endLine, START_END_TAG_MISMATCH_RULE_NAME); 36 this.startLine = startLine; 37 this.startColumn = startColumn; 38 this.startTagName = startTagName; 39 40 this.endLine = endLine; 41 this.endColumn = endColumn; 42 this.endTagName = endTagName; 43 } 44 45 46 49 public int getEndColumn() { 50 return endColumn; 51 } 52 53 56 public int getEndLine() { 57 return endLine; 58 } 59 60 63 public int getStartColumn() { 64 return startColumn; 65 } 66 67 70 public int getStartLine() { 71 return startLine; 72 } 73 74 77 public String getMessage() { 78 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 } 85 | Popular Tags |