1 package org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective;
3 import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
5 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
6 import org.opendaylight.yangtools.yang.parser.spi.source.SourceException;
8 public class EffectiveStmtUtils {
10 private EffectiveStmtUtils(){
11 throw new UnsupportedOperationException("Utility class");
14 public static final SourceException createNameCollisionSourceException(
15 final StmtContext<?, ?, ?> ctx,
16 EffectiveStatement<?, ?> effectiveStatement) {
17 return new SourceException("Error in module '"
18 + ctx.getRoot().getStatementArgument()
20 + effectiveStatement.argument()
21 + "'. Node name collision: '"
22 + effectiveStatement.argument()
23 + "' already declared.",
24 ctx.getStatementSourceReference());