Mark MutationBehaviour evolution
[yangtools.git] / common / concepts / src / main / java / org / opendaylight / yangtools / concepts / Codec.java
index 64c24bf74e7bef244e3f179f1adf1f29fde959ec..91060a1b6663eeea1972a047fde24748333b5388 100644 (file)
@@ -7,11 +7,18 @@
  */
 package org.opendaylight.yangtools.concepts;
 
-public interface Codec<P,I> extends Serializer<P, I>, Deserializer<I, P> {
-
+/**
+ * The concept of a combined {@link Serializer} and {@link Deserializer}, which produces an object from some input.
+ * Implementations should consider subclassing {@link AbstractCodec}.
+ *
+ * @param <P> Product type
+ * @param <I> Input type
+ * @param <X> Error exception type
+ */
+public interface Codec<P, I, X extends Exception> extends Serializer<P, I, X>, Deserializer<I, P, X> {
     @Override
-    public I deserialize(P input);
-    
+    I deserialize(P input) throws X;
+
     @Override
-    public P serialize(I input);
+    P serialize(I input) throws X;
 }