Remove AugmentationSchemaNode.getOriginalDefinition()
[yangtools.git] / parser / yang-parser-spi / src / main / java / org / opendaylight / yangtools / yang / parser / spi / meta / ImplicitParentAwareStatementSupport.java
1 /*
2  * Copyright (c) 2018 Pantheon Technologies, s.r.o. 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 java.util.Optional;
12 import org.opendaylight.yangtools.yang.model.api.meta.StatementDefinition;
13
14 /**
15  * {@link StatementSupport} trait for statements which create intermediate parent node for some of its child nodes.
16  * An example of this is RFC6020/RFC7950 choice statement, which creates implicit case statements for child containers
17  * and others.
18  */
19 @Beta
20 public interface ImplicitParentAwareStatementSupport {
21     /**
22      * Returns implicit parent statement support for supplied statement definition, if it is defined. This allows
23      * implementations of this interface add implicit parent to the build context hierarchy before a substatement
24      * is created.
25      *
26      * @param parent parent statement context
27      * @param stmtDef statement definition of substatement
28      * @return optional of implicit parent statement support
29      */
30     Optional<StatementSupport<?, ?, ?>> getImplicitParentFor(NamespaceStmtCtx parent, StatementDefinition stmtDef);
31 }