[ONOS-5141],[ONOS-5142],[ONOS-5165],[ONOS-4881],[ONOS-4889],[ONOS-5104],[ONOS-5138] defect fixes
Change-Id: I435dc0cf9afae7230fc98b57f33af104e0e38e67
diff --git a/plugin/src/main/java/org/onosproject/yangutils/translator/exception/InvalidNodeForTranslatorException.java b/plugin/src/main/java/org/onosproject/yangutils/translator/exception/InvalidNodeForTranslatorException.java
index c737175..935f6b6 100644
--- a/plugin/src/main/java/org/onosproject/yangutils/translator/exception/InvalidNodeForTranslatorException.java
+++ b/plugin/src/main/java/org/onosproject/yangutils/translator/exception/InvalidNodeForTranslatorException.java
@@ -23,6 +23,8 @@
private static final long serialVersionUID = 20160311L;
private transient String fileName;
+ private transient int lineNumber;
+ private transient int charPosition;
/**
* Creates a new exception.
@@ -69,9 +71,45 @@
}
/**
- * Sets file name in translator exception.
+ * Returns line number of the exception.
*
- * @param fileName generated file name
+ * @return line number of the exception
+ */
+ public int getLineNumber() {
+ return this.lineNumber;
+ }
+
+ /**
+ * Returns position of the exception.
+ *
+ * @return position of the exception
+ */
+ public int getCharPositionInLine() {
+ return this.charPosition;
+ }
+
+ /**
+ * Sets line number of YANG file.
+ *
+ * @param line line number of YANG file
+ */
+ public void setLine(int line) {
+ this.lineNumber = line;
+ }
+
+ /**
+ * Sets position of exception.
+ *
+ * @param charPosition position of exception
+ */
+ public void setCharPosition(int charPosition) {
+ this.charPosition = charPosition;
+ }
+
+ /**
+ * Sets file name in exception.
+ *
+ * @param fileName YANG file name
*/
public void setFileName(String fileName) {
this.fileName = fileName;