package org.opendaylight.mdsal.binding.dom.codec.impl;
import com.google.common.collect.ImmutableMap;
+import java.lang.reflect.Method;
import java.util.List;
+import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
import org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTreeNode;
-import org.opendaylight.mdsal.binding.generator.util.BindingRuntimeContext;
-import org.opendaylight.yangtools.yang.binding.DataObjectSerializer;
+import org.opendaylight.mdsal.binding.dom.codec.loader.CodecClassLoader;
+import org.opendaylight.mdsal.binding.runtime.api.BindingRuntimeContext;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
* <p>
* Two core subtypes of codec context are available:
* <ul>
- * <li>{@link LeafNodeCodecContext} - Context for nodes, which does not contain any nested YANG modeled substructures.
+ * <li>{@link ValueNodeCodecContext} - Context for nodes, which does not contain any nested YANG modeled substructures.
* </li>
* <li>{@link DataObjectCodecContext} - Context for nodes, which does contain nested YANG modeled substructures. This
* context nodes contains context for children nodes.</li>
* </ul>
*/
abstract class NodeCodecContext implements BindingCodecTreeNode {
-
/**
* Returns Yang Instance Identifier Path Argument of current node.
*
* @param schema Instantiated schema of binding type.
* @return Map of local name to leaf node context.
*/
- ImmutableMap<String, LeafNodeCodecContext> getLeafNodes(Class<?> type, DataNodeContainer schema);
+ ImmutableMap<Method, ValueNodeCodecContext> getLeafNodes(Class<?> type, DataNodeContainer schema);
/**
* Returns Path argument codec for list item.
*/
IdentifiableItemCodec getPathArgumentCodec(Class<?> type, ListSchemaNode schema);
+ /**
+ * Return the codec loader associated with this factory.
+ *
+ * @return A codec loader instance
+ */
+ @NonNull CodecClassLoader getLoader();
+
+ @NonNull DataObjectStreamer<?> getDataObjectSerializer(Class<?> type);
+
DataObjectSerializer getEventStreamSerializer(Class<?> type);
}
return null;
}
- protected abstract Object deserializeObject(NormalizedNode<?, ?> normalizedNode);
+ protected abstract Object deserializeObject(NormalizedNode normalizedNode);
}