Add methods for modifying deserializer mapping
[openflowjava.git] / openflow-protocol-impl / src / main / java / org / opendaylight / openflowjava / protocol / impl / util / TypeToClassInitHelper.java
index 246c410569f17180b268a2e456a1faa0a9213fce..b360f89fd4cda606c17047a5521add6dd0895b24 100644 (file)
@@ -1,42 +1,41 @@
-/*\r
- * Copyright (c) 2013 Pantheon Technologies s.r.o. and others.  All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-package org.opendaylight.openflowjava.protocol.impl.util;\r
-\r
-import java.util.Map;\r
-\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.TypeToClassKey;\r
-\r
-/**\r
- * @author michal.polkorab\r
- *\r
- */\r
-public class TypeToClassInitHelper {\r
-\r
-    private short version;\r
-    private Map<TypeToClassKey, Class<?>> messageClassMap;\r
-\r
-    /**\r
-     * Constructor\r
-     * @param version protocol wire version\r
-     * @param messageClassMap map which stores type to class mapping\r
-     */\r
-    public TypeToClassInitHelper(short version, Map<TypeToClassKey, \r
-            Class<?>> messageClassMap) {\r
-        this.version = version;\r
-        this.messageClassMap = messageClassMap;\r
-    }\r
-\r
-    /**\r
-     * Registers Class int the type to class mapping\r
-     * @param type code value for message type / class\r
-     * @param clazz corresponding code -> class\r
-     */\r
-    public void registerTypeToClass(short type, Class<?> clazz) {\r
-        messageClassMap.put(new TypeToClassKey(version, type), clazz);\r
-    }\r
-}\r
+/*
+ * Copyright (c) 2013 Pantheon Technologies s.r.o. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.openflowjava.protocol.impl.util;
+
+import java.util.Map;
+import org.opendaylight.openflowjava.protocol.api.keys.TypeToClassKey;
+
+/**
+ * @author michal.polkorab
+ *
+ */
+public class TypeToClassInitHelper {
+
+    private short version;
+    private Map<TypeToClassKey, Class<?>> messageClassMap;
+
+    /**
+     * Constructor
+     * @param version protocol wire version
+     * @param messageClassMap map which stores type to class mapping
+     */
+    public TypeToClassInitHelper(short version, Map<TypeToClassKey,
+            Class<?>> messageClassMap) {
+        this.version = version;
+        this.messageClassMap = messageClassMap;
+    }
+
+    /**
+     * Registers Class int the type to class mapping
+     * @param type code value for message type / class
+     * @param clazz class corresponding to the code
+     */
+    public void registerTypeToClass(short type, Class<?> clazz) {
+        messageClassMap.put(new TypeToClassKey(version, type), clazz);
+    }
+}