Introduce UnresolvedQName
[yangtools.git] / common / concepts / src / main / java / org / opendaylight / yangtools / concepts / Deserializer.java
index 11dffc455bc59464c43da36fe35d3691db4263c9..d327beafdd93b43cee1acedc2c0110b7360bd8a7 100644 (file)
@@ -7,18 +7,23 @@
  */
 package org.opendaylight.yangtools.concepts;
 
+import org.eclipse.jdt.annotation.NonNull;
+
 /**
- * The concept of a serializer, which produces an object from some input.
+ * The concept of a deserializer, which produces an object from some input.
  *
  * @param <P> Product type
  * @param <I> Input type
+ * @param <X> Error exception type
  */
-public interface Deserializer<P, I> {
+public interface Deserializer<P, I, X extends Exception> {
     /**
      * Produce an object base on input.
      *
      * @param input Input object
      * @return Product derived from input
+     * @throws NullPointerException if input is null
+     * @throws X when input is not valid
      */
-    P deserialize(I input);
+    @NonNull P deserialize(@NonNull I input) throws X;
 }