+++ /dev/null
-/*
- * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.yangtools.yang.model.api;
-
-/**
- * Allows access to module source.
- *
- * @deprecated This interface is a violation of the effective model contract. To look up the source of a particular
- * module use a {@link org.opendaylight.yangtools.yang.model.repo.api.SchemaRepository} or a similar
- * lookup table.
- */
-@Deprecated
-public interface SourceStreamAware {
-
- /**
- * Get descriptive source path (usually file path) from which this module was parsed.
- */
- String getModuleSourcePath();
-}
import org.opendaylight.yangtools.yang.parser.spi.meta.MutableStatement;
import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext.Mutable;
-import org.opendaylight.yangtools.yang.parser.spi.source.DeclarationInTextSource;
import org.opendaylight.yangtools.yang.parser.spi.source.IncludedSubmoduleNameToIdentifier;
import org.opendaylight.yangtools.yang.parser.spi.source.SourceException;
abstract class AbstractEffectiveModule<D extends DeclaredStatement<String>> extends
AbstractEffectiveDocumentedNode<String, D> implements Module, MutableStatement {
private final String name;
- private final String sourcePath;
private final String prefix;
private final YangVersion yangVersion;
private final String organization;
final ContactEffectiveStatementImpl contactStmt = firstEffective(ContactEffectiveStatementImpl.class);
this.contact = contactStmt == null ? null : contactStmt.argument();
- if (ctx.getStatementSourceReference() instanceof DeclarationInTextSource) {
- this.sourcePath = ((DeclarationInTextSource) ctx.getStatementSourceReference()).getSourceName();
- } else {
- this.sourcePath = null;
- }
-
// init submodules and substatements of submodules
final List<EffectiveStatement<?, ?>> substatementsOfSubmodules;
final Map<String, ModuleIdentifier> includedSubmodulesMap = ctx
}
- @Override
- public String getModuleSourcePath() {
- return sourcePath;
- }
-
@Override
public String getSource() {
return null;