import org.opendaylight.yangtools.yang.binding.Identifiable;
import org.opendaylight.yangtools.yang.binding.Identifier;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.binding.InstanceNotification;
+import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier;
import org.opendaylight.yangtools.yang.binding.KeyedListAction;
+import org.opendaylight.yangtools.yang.binding.KeyedListNotification;
import org.opendaylight.yangtools.yang.binding.Notification;
import org.opendaylight.yangtools.yang.binding.NotificationListener;
import org.opendaylight.yangtools.yang.binding.OpaqueObject;
private static final ConcreteType ACTION = typeForClass(Action.class);
private static final ConcreteType CHILD_OF = typeForClass(ChildOf.class);
private static final ConcreteType CHOICE_IN = typeForClass(ChoiceIn.class);
+ private static final ConcreteType INSTANCE_NOTIFICATION = typeForClass(InstanceNotification.class);
+ private static final ConcreteType KEYED_INSTANCE_IDENTIFIER = typeForClass(KeyedInstanceIdentifier.class);
private static final ConcreteType KEYED_LIST_ACTION = typeForClass(KeyedListAction.class);
+ private static final ConcreteType KEYED_LIST_NOTIFICATION = typeForClass(KeyedListNotification.class);
private static final ConcreteType OPAQUE_OBJECT = typeForClass(OpaqueObject.class);
private static final ConcreteType RPC_RESULT = typeForClass(RpcResult.class);
return parameterizedTypeFor(KEYED_LIST_ACTION, keyType, parent, input, output);
}
+ /**
+ * Type specializing {@link InstanceNotification} for a particular type.
+ *
+ * @param parent Type of parent defining the notification
+ * @return A parameterized type corresponding to {@code InstanceNotification<Parent>}
+ * @throws NullPointerException if {@code parent} is is null
+ */
+ public static ParameterizedType instanceNotification(final Type concreteType, final Type parent) {
+ return parameterizedTypeFor(INSTANCE_NOTIFICATION, concreteType, parent);
+ }
+
+ /**
+ * Type specializing {@link InstanceNotification} for a particular type.
+ *
+ * @param parent Type of parent defining the notification
+ * @param keyType Type of parent's key
+ * @return A parameterized type corresponding to {@code KeyedInstanceNotification<ParentKey, Parent>}
+ * @throws NullPointerException if any argument is is null
+ */
+ public static ParameterizedType keyedListNotification(final Type concreteType, final Type parent,
+ final Type keyType) {
+ return parameterizedTypeFor(KEYED_LIST_NOTIFICATION, concreteType, parent, keyType);
+ }
+
/**
* Specialize {@link Augmentable} for a particular type.
*
return parameterizedTypeFor(INSTANCE_IDENTIFIER, type);
}
+ /**
+ * Type specializing {@link KeyedInstanceIdentifier} for a particular type.
+ *
+ * @param type Type for which to specialize
+ * @param keyType Type of key
+ * @return A parameterized type corresponding to {@code KeyedInstanceIdentifier<Type, KeyType>}
+ * @throws NullPointerException if any argument is is null
+ */
+ public static ParameterizedType keyedInstanceIdentifier(final Type type, final Type keyType) {
+ return parameterizedTypeFor(KEYED_INSTANCE_IDENTIFIER, type, keyType);
+ }
+
/**
* Type specializing {@link OpaqueObject} for a particular type.
*