Map identities to proper objects
[mdsal.git] / binding / yang-binding / src / main / java / org / opendaylight / yangtools / yang / binding / BindingContract.java
1 /*
2  * Copyright (c) 2022 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.binding;
9
10 import com.google.common.annotations.Beta;
11 import org.eclipse.jdt.annotation.NonNull;
12
13 /**
14  * Base interface for all interfaces generated to capture a specific contract.
15  *
16  * @param <T> Type of the captured contract
17  */
18 @Beta
19 // FIXME: evaluate integrating with BindingObject
20 public interface BindingContract<T extends BindingContract<T>> {
21     /**
22      * Return the interface implemented by this object. This method differs from {@link Object#getClass()} in that it
23      * returns the interface contract, not a concrete implementation class.
24      *
25      * @return Implemented contract
26      */
27     @NonNull Class<? extends T> implementedInterface();
28 }