Populate model/ hierarchy
[yangtools.git] / model / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / EffectiveStatementEquivalent.java
1 /*
2  * Copyright (c) 2020 PANTHEON.tech, 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.model.api;
9
10 import com.google.common.annotations.Beta;
11 import org.eclipse.jdt.annotation.NonNull;
12 import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
13
14 /**
15  * Marker interface for objects which have an equivalent EffectiveStatement. This interface generally serves as a bridge
16  * from legacy {@link DocumentedNode}s view of the schema to the more modern {@link EffectiveStatement}s view.
17  *
18  * <p>
19  * This is a transitional interface tied to {@link DocumentedNode} and is expected to follow its lifecycle, i.e. it will
20  * be deprecated and removed when last of its users in this package go.
21  *
22  * <p>
23  * Implementations of this interface are recommeded to return a constant object, preferably {@code this}.
24  *
25  * @param <E> Type of equivalent {@link EffectiveStatement}.
26  */
27 @Beta
28 public interface EffectiveStatementEquivalent<E extends EffectiveStatement<?, ?>> {
29     /**
30      * Return {@link EffectiveStatement} representation of this object.
31      *
32      * @return {@link EffectiveStatement} representation of this object.
33      */
34     @NonNull E asEffectiveStatement();
35 }