- DeviationBuilder(final String targetPathStr, final int line) {
- this.line = line;
- final SchemaPath targetPath = YangModelBuilderUtil
- .parseAugmentPath(targetPathStr);
- instance = new DeviationImpl(targetPath);
+ DeviationBuilder(final String moduleName, final int line, final String targetPathStr) {
+ super(moduleName, line);
+ if (!targetPathStr.startsWith("/")) {
+ throw new YangParseException(moduleName, line,
+ "Deviation argument string must be an absolute schema node identifier.");
+ }
+ this.targetPathStr = targetPathStr;
+ this.targetPath = ParserListenerUtils.parseAugmentPath(targetPathStr);
+ instance = new DeviationImpl();