Improve BindingContract documentation 60/105560/2
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 20 Apr 2023 22:43:03 +0000 (00:43 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 20 Apr 2023 23:39:51 +0000 (01:39 +0200)
Enumerate the use allowed interfaces and explain how they relate to
BindingContract. This interface is sufficiently disconnect from
BindingObject, which has other implications.

Change-Id: I0f93781dbabb540596fc5ac37dfd1bdb509732e6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
binding/yang-binding/src/main/java/org/opendaylight/yangtools/yang/binding/BindingContract.java

index a805fc11c498342f079cc85b1d38a98cebc2d9d7..4f97b3872fc0f3eaaf88b9b4df2d748b2acebf7e 100644 (file)
@@ -11,12 +11,23 @@ import com.google.common.annotations.Beta;
 import org.eclipse.jdt.annotation.NonNull;
 
 /**
- * Base interface for all interfaces generated to capture a specific contract.
+ * Base interface for all interfaces generated to capture a specific contract. There are five basic contracts defined
+ * by YANG statements:
+ * <ul>
+ *   <li>{@code feature}, represented by {@link YangFeature}</li>
+ *   <li>{@code identity}, represented by {@link BaseIdentity}</li>
+ *   <li>{@code action}, represented by {@link Action}</li>
+ *   <li>{@code rpc}, presented by {@link Rpc}</li>
+ *   <li>data definition statements expressing data and metadata exchanged between two parties, represeented by
+ *       {@link DataContainer}</li>
+ * </ul>
+ *
+ * <p>
+ * As can be seen, this contract is more general than {@link BindingObject}.
  *
  * @param <T> Type of the captured contract
  */
 @Beta
-// FIXME: evaluate integrating with BindingObject
 public sealed interface BindingContract<T extends BindingContract<T>>
         permits Action, BaseIdentity, DataContainer, Rpc, YangFeature {
     /**