2 * Copyright (c) 2018 Pantheon Technologies, 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.spi.meta;
10 import com.google.common.annotations.Beta;
11 import java.util.Optional;
12 import org.opendaylight.yangtools.yang.model.api.meta.StatementDefinition;
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
19 * @author Robert Varga
22 public interface ImplicitParentAwareStatementSupport {
24 * Returns implicit parent statement support for supplied statement definition, if it is defined. This allows
25 * implementations of this interface add implicit parent to the build context hierarchy before a substatement
28 * @param stmtDef statement definition of substatement
29 * @return optional of implicit parent statement support
31 Optional<StatementSupport<?, ?, ?>> getImplicitParentFor(StatementDefinition stmtDef);