2 * Copyright (c) 2020 PANTHEON.tech, s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.yangtools.yang.parser.stmt.reactor;
10 import static java.util.Objects.requireNonNull;
12 import com.google.common.base.VerifyException;
13 import java.util.AbstractMap;
15 import org.opendaylight.yangtools.yang.parser.spi.meta.ParserNamespace;
18 * Placeholder namespace map which does not allow access and acts as a sentinel for namespaces which have been
19 * explicitly removed from {@link NamespaceStorageSupport}.
21 final class SweptNamespace extends AbstractMap<Object, Object> {
22 private final ParserNamespace<?, ?> name;
24 SweptNamespace(final ParserNamespace<?, ?> name) {
25 this.name = requireNonNull(name);
29 public Set<Entry<Object, Object>> entrySet() {
30 throw new VerifyException("Attempted to access swept namespace " + name);