Mass replace CRLF->LF
[openflowjava.git] / openflow-protocol-impl / src / main / java / org / opendaylight / openflowjava / protocol / impl / deserialization / match / AbstractOxmMatchEntryDeserializer.java
index 99c0f8cd0db8eeea840e8b37c091b5e93a885b77..1d737b093bfc57e1673d3108d8ba70548b37ac66 100644 (file)
@@ -1,64 +1,64 @@
-/*\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.deserialization.match;\r
-\r
-import io.netty.buffer.ByteBuf;\r
-\r
-import org.opendaylight.openflowjava.protocol.api.extensibility.HeaderDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.util.EncodeConstants;\r
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.Clazz;\r
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;\r
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;\r
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;\r
-\r
-/**\r
- * @author michal.polkorab\r
- *\r
- */\r
-public abstract class AbstractOxmMatchEntryDeserializer implements HeaderDeserializer<MatchEntries> {\r
-\r
-    @Override\r
-    public MatchEntries deserializeHeader(ByteBuf input) {\r
-        MatchEntriesBuilder builder = processHeader(getOxmClass(), getOxmField(), input);\r
-        return builder.build();\r
-    }\r
-\r
-    /**\r
-     * @return oxm_field class\r
-     */\r
-    protected abstract Class<? extends MatchField> getOxmField();\r
-\r
-    /**\r
-     * @return oxm_class class\r
-     */\r
-    protected abstract Class<? extends Clazz> getOxmClass();\r
-\r
-    /**\r
-     * Prepares match entry header - sets oxm_class, oxm_field, hasMask\r
-     *  + sets the buffer.readerIndex() to the end of match entry \r
-     *  - where augmentation starts\r
-     * @param oxm_class oxm class type\r
-     * @param oxm_field oxm field type\r
-     * @param input input bytebuf\r
-     * @return MatchEntriesBuilder which can be filled with MatchEntry augmentation\r
-     */\r
-    protected MatchEntriesBuilder processHeader(Class<? extends Clazz> oxm_class,\r
-            Class<? extends MatchField> oxm_field, ByteBuf input) {\r
-        MatchEntriesBuilder builder = new MatchEntriesBuilder();\r
-        builder.setOxmClass(oxm_class);\r
-        // skip oxm_class (provided)\r
-        input.skipBytes(EncodeConstants.SIZE_OF_SHORT_IN_BYTES);\r
-        builder.setOxmMatchField(oxm_field);\r
-        boolean hasMask = (input.readUnsignedByte() & 1) != 0;\r
-        builder.setHasMask(hasMask);\r
-        // skip match entry length - not needed\r
-        input.skipBytes(EncodeConstants.SIZE_OF_BYTE_IN_BYTES);\r
-        return builder;\r
-    }\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.deserialization.match;
+
+import io.netty.buffer.ByteBuf;
+
+import org.opendaylight.openflowjava.protocol.api.extensibility.HeaderDeserializer;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntriesBuilder;
+
+/**
+ * @author michal.polkorab
+ *
+ */
+public abstract class AbstractOxmMatchEntryDeserializer implements HeaderDeserializer<MatchEntries> {
+
+    @Override
+    public MatchEntries deserializeHeader(ByteBuf input) {
+        MatchEntriesBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
+        return builder.build();
+    }
+
+    /**
+     * @return oxm_field class
+     */
+    protected abstract Class<? extends MatchField> getOxmField();
+
+    /**
+     * @return oxm_class class
+     */
+    protected abstract Class<? extends OxmClassBase> getOxmClass();
+
+    /**
+     * Prepares match entry header - sets oxm_class, oxm_field, hasMask
+     *  + sets the buffer.readerIndex() to the end of match entry 
+     *  - where augmentation starts
+     * @param oxmClass oxm class type
+     * @param oxmField oxm field type
+     * @param input input bytebuf
+     * @return MatchEntriesBuilder which can be filled with MatchEntry augmentation
+     */
+    protected MatchEntriesBuilder processHeader(Class<? extends OxmClassBase> oxmClass,
+            Class<? extends MatchField> oxmField, ByteBuf input) {
+        MatchEntriesBuilder builder = new MatchEntriesBuilder();
+        builder.setOxmClass(oxmClass);
+        // skip oxm_class (provided)
+        input.skipBytes(EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
+        builder.setOxmMatchField(oxmField);
+        boolean hasMask = (input.readUnsignedByte() & 1) != 0;
+        builder.setHasMask(hasMask);
+        // skip match entry length - not needed
+        input.skipBytes(EncodeConstants.SIZE_OF_BYTE_IN_BYTES);
+        return builder;
+    }
+    
+}