/*
* Copyright (c) 2022 PANTHEON.tech, s.r.o. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
package org.opendaylight.yangtools.yang.binding;
import com.google.common.annotations.Beta;
import org.eclipse.jdt.annotation.NonNull;
/**
* Base interface for all interfaces generated to capture a specific contract. There are five basic contracts defined
* by YANG statements:
*
* - {@code feature}, represented by {@link YangFeature}
* - {@code identity}, represented by {@link BaseIdentity}
* - {@code action}, represented by {@link Action}
* - {@code rpc}, presented by {@link Rpc}
* - data definition statements expressing data and metadata exchanged between two parties, represeented by
* {@link DataContainer}
*
*
*
* As can be seen, this contract is more general than {@link BindingObject}.
*
* @param Type of the captured contract
*/
@Beta
public sealed interface BindingContract>
permits Action, BaseIdentity, DataContainer, Rpc, YangFeature {
/**
* Return the interface implemented by this object. This method differs from {@link Object#getClass()} in that it
* returns the interface contract, not a concrete implementation class.
*
* @return Implemented contract
*/
@NonNull Class extends T> implementedInterface();
}