Remove AugmentationSchemaNode.getOriginalDefinition()
[yangtools.git] / parser / yang-parser-spi / src / main / java / org / opendaylight / yangtools / yang / parser / spi / meta / StatementDefinitionNamespace.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.yangtools.yang.parser.spi.meta;
9
10 import com.google.common.annotations.Beta;
11 import org.eclipse.jdt.annotation.NonNull;
12 import org.opendaylight.yangtools.yang.common.QName;
13 import org.opendaylight.yangtools.yang.model.api.meta.StatementDefinition;
14
15 /**
16  * Module-specific namespace for holding {@link StatementDefinition}s defined by extension statements. This namespace
17  * is populated before full declaration phase.
18  *
19  * @author Robert Varga
20  */
21 // FIXME: 8.0.0: Fix naming and javadoc of this namespace.
22 //
23 // We have three competing namespaces dealing with various things and the interaction is no entirely clear:
24 // - ExtensionNamespace, which is populated by ExtensionStatementSupport for all extensions with the corresponding
25 //                       effective statement and used by SubstatementValidator
26 // - StatementDefinitionNamespace (this), which is again populated by ExtensionStatementSupport to point to unrecognized
27 //                                        statement support, i.e. preventing instantiation, and is used only by
28 //                                        reactor's SourceSpecificContext
29 // - StatementSupportNamespace, which is a virtual namespace providing access to StatementSupport instances for all
30 //                              statements available in current processing phase of the source. It works as a union of
31 //                              this namespace (StatementDefinitionNamespace) and the contents of
32 //                              StatementSupportBundles.
33 //
34 // At the end of the day this feels like an under-utilized namespace: provided the contents of ExtensionNamespace and
35 // StatementSupportBundles, SourceSpecificSpecificContext should be able to work its magic even without this namespace.
36 @Beta
37 public interface StatementDefinitionNamespace extends ParserNamespace<QName, StatementSupport<?, ?, ?>> {
38     NamespaceBehaviour<QName, StatementSupport<?, ?, ?>, @NonNull StatementDefinitionNamespace> BEHAVIOUR =
39             NamespaceBehaviour.global(StatementDefinitionNamespace.class);
40
41 }