+++ /dev/null
-/*
- * Copyright (c) 2015 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.parser.spi.meta;
-
-import java.io.Serial;
-import org.eclipse.jdt.annotation.NonNull;
-
-/**
- * Special namespace which allows import of namespaces from other sources.
- *
- * <p>
- * This namespace and its subclasses are used by model processor to link / import namespaces to context node from
- * supplied {@link StmtContext}.
- *
- * <p>
- * This abstraction allows for imports and includes be implement as derived namespaces of this, but is not tied only for
- * import and include statements.
- *
- * @param <K> Imported context identifier
- */
-public final class ImportedNamespaceContext<K> extends ParserNamespace<K, StmtContext<?, ?, ?>> {
- @Serial
- private static final long serialVersionUID = 1L;
-
- public ImportedNamespaceContext(final @NonNull String name) {
- super(name);
- }
-}
import org.opendaylight.yangtools.yang.model.api.stmt.ModuleStatement;
import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier;
import org.opendaylight.yangtools.yang.parser.spi.ParserNamespaces;
-import org.opendaylight.yangtools.yang.parser.spi.meta.ImportedNamespaceContext;
import org.opendaylight.yangtools.yang.parser.spi.meta.ParserNamespace;
import org.opendaylight.yangtools.yang.parser.spi.meta.StatementNamespace;
import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
* to correctly populate prefixes map for actual parsing phase and eventually, resolve QName for any valid declared
* statement.
*/
- public static final @NonNull ImportedNamespaceContext<String> BELONGSTO_PREFIX_TO_MODULECTX =
- new ImportedNamespaceContext<>("belongsto-prefix-to-module");
+ public static final @NonNull ParserNamespace<String, StmtContext<?, ?, ?>> BELONGSTO_PREFIX_TO_MODULECTX =
+ new ParserNamespace<>("belongsto-prefix-to-module");
/**
* Source-specific mapping of prefixes to namespaces.
new ParserNamespace<>("import-prefix-to-modulectx");
// FIXME: document this
- public static final @NonNull ImportedNamespaceContext<SourceIdentifier> IMPORTED_MODULE =
- new ImportedNamespaceContext<>("imported-module");
+ public static final @NonNull ParserNamespace<SourceIdentifier, StmtContext<?, ?, ?>> IMPORTED_MODULE =
+ new ParserNamespace<>("imported-module");
// FIXME: document this
// FIXME: is this 'included submodule' instead?
- public static final @NonNull ImportedNamespaceContext<SourceIdentifier> INCLUDED_MODULE =
- new ImportedNamespaceContext<>("included-module");
+ public static final @NonNull ParserNamespace<SourceIdentifier, StmtContext<?, ?, ?>> INCLUDED_MODULE =
+ new ParserNamespace<>("included-module");
/**
* Source-specific mapping of prefixes to namespaces.