Add support for composite notification listeners
[mdsal.git] / binding / mdsal-binding-api / src / main / java / org / opendaylight / mdsal / binding / api / ActionSpec.java
index 206fed3f48c820a04eae313a803b1654028e7e4f..554fa5f4a8bebc070cfe1236ef7a455f237c1633 100644 (file)
@@ -26,7 +26,11 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier.InstanceIdenti
 
 /**
  * A combination of an {@link Action} class and its corresponding instantiation wildcard, expressed as
- * an {@link InstanceIdentifier}. This glue is required because action interfaces are generated at the place of their
+ * an {@link InstanceIdentifier}. This means that {@code list}s are treated exactly as @{code container}s are, e.g.
+ * without a key value specification.
+ *
+ * <p>
+ * This glue is required because action interfaces are generated at the place of their
  * definition, most importantly in {@code grouping} and we actually need to bind to a particular instantiation (e.g. a
  * place where {@code uses} references that grouping).
  *
@@ -34,7 +38,7 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier.InstanceIdenti
  * @param <P> Action parent type
  */
 @Beta
-public final class ActionSpec<A extends Action<InstanceIdentifier<P>, ?, ?>, P extends DataObject>
+public final class ActionSpec<A extends Action<? extends InstanceIdentifier<P>, ?, ?>, P extends DataObject>
         implements Immutable {
     private final @NonNull InstanceIdentifier<P> path;
     private final @NonNull Class<A> type;
@@ -108,7 +112,8 @@ public final class ActionSpec<A extends Action<InstanceIdentifier<P>, ?, ?>, P e
             return castThis();
         }
 
-        public <A extends Action<InstanceIdentifier<P>, ?, ?>> @NonNull ActionSpec<A, P> build(final Class<A> type) {
+        public <A extends Action<? extends InstanceIdentifier<P>, ?, ?>> @NonNull ActionSpec<A, P> build(
+                final Class<A> type) {
             return new ActionSpec<>(type, pathBuilder.build());
         }