Gaurav Agrawal | cc55d48 | 2016-05-03 00:41:48 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016-present Open Networking Laboratory |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package org.onosproject.yangutils.datamodel; |
| 18 | |
| 19 | /** |
| 20 | * Abstraction of location information, this is used during resolution is |
| 21 | * carried out and line/character position in line is required to point |
| 22 | * out the error location in YANG file. |
| 23 | */ |
| 24 | public interface LocationInfo { |
| 25 | |
| 26 | /** |
| 27 | * Returns the line number YANG construct in file. |
| 28 | * |
| 29 | * @return the line number YANG construct in file |
| 30 | */ |
| 31 | int getLineNumber(); |
| 32 | |
| 33 | /** |
| 34 | * Returns the character position in line. |
| 35 | * |
| 36 | * @return the character position in line |
| 37 | */ |
| 38 | int getCharPosition(); |
| 39 | |
| 40 | /** |
| 41 | * Sets line number of YANG construct. |
| 42 | * |
| 43 | * @param lineNumber the line number of YANG construct in file |
| 44 | */ |
| 45 | void setLineNumber(int lineNumber); |
| 46 | |
| 47 | /** |
| 48 | * Sets character position of YANG construct. |
| 49 | * |
| 50 | * @param charPositionInLine character position of YANG construct in file |
| 51 | */ |
| 52 | void setCharPosition(int charPositionInLine); |
| 53 | } |