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