Separate out DataContainerPrototype
[mdsal.git] / binding / mdsal-binding-dom-codec / src / main / java / org / opendaylight / mdsal / binding / dom / codec / impl / CommonDataObjectCodecContext.java
index 86682a77446f09a1ac64060faedc0338d9da6dd8..cae761a9bb2db286a26641e80c73ac7e291fb065 100644 (file)
@@ -14,7 +14,6 @@ import org.opendaylight.mdsal.binding.dom.codec.api.CommonDataObjectCodecTreeNod
 import org.opendaylight.mdsal.binding.runtime.api.CompositeRuntimeType;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier.PathArgument;
-import org.opendaylight.yangtools.yang.common.QNameModule;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
 
@@ -27,24 +26,24 @@ abstract sealed class CommonDataObjectCodecContext<D extends DataObject, T exten
     final @NonNull CommonDataObjectCodecPrototype<T> prototype;
 
     CommonDataObjectCodecContext(final CommonDataObjectCodecPrototype<T> prototype) {
-        super(prototype.getType());
+        super(prototype.runtimeType());
         this.prototype = requireNonNull(prototype);
     }
 
     @SuppressWarnings("unchecked")
     @Override
     public final Class<D> getBindingClass() {
-        return Class.class.cast(prototype.getBindingClass());
+        return Class.class.cast(prototype.javaClass());
     }
 
     @Override
     protected final CodecContextFactory factory() {
-        return prototype.getFactory();
+        return prototype.contextFactory();
     }
 
     @Override
     protected final T type() {
-        return prototype.getType();
+        return prototype.runtimeType();
     }
 
     @Override
@@ -62,8 +61,4 @@ abstract sealed class CommonDataObjectCodecContext<D extends DataObject, T exten
     protected final PathArgument bindingArg() {
         return prototype.getBindingArg();
     }
-
-    protected final QNameModule namespace() {
-        return prototype.getNamespace();
-    }
 }