1. Added more match fields for ICMPv6 and MPLS
2. Fixes to avoid unnecessary warnings in generated code
3. Added the general method Match getMatch() to factories and made unit tests use it
diff --git a/java_gen/templates/of_factory_class.java b/java_gen/templates/of_factory_class.java
index adf5df1..86b092a 100644
--- a/java_gen/templates/of_factory_class.java
+++ b/java_gen/templates/of_factory_class.java
@@ -27,12 +27,15 @@
 //::
 //:: import itertools
 //:: import of_g
+//:: import re
 //:: include('_copyright.java')
 
 //:: include('_autogen.java')
 
 package ${factory.package};
 
+import org.projectfloodlight.openflow.protocol.OFOxmList;
+
 //:: include("_imports.java")
 
 public class ${factory.name} implements ${factory.interface.name} {
@@ -45,10 +48,13 @@
     }
     //:: #endfor
 
+//:: general_get_match_func_written = False
 //:: for i in factory.interface.members:
     //:: if i.is_virtual:
     //::    continue
     //:: #endif
+    //:: is_match_object = re.match('OFMatch.*', i.name) # i.has_version(factory.version) and model.generate_class(i.versioned_class(factory.version)) and i.versioned_class(factory.version).interface.parent_interface == 'Match'
+    //:: unsupported_match_object = is_match_object and not i.has_version(factory.version)
 
     //:: if len(i.writeable_members) > 0:
     public ${i.name}.Builder ${factory.interface.method_name(i, builder=True)}() {
@@ -59,6 +65,12 @@
         //:: #endif
     }
     //:: #endif
+    //:: if not general_get_match_func_written and is_match_object and not unsupported_match_object:
+    public Match.Builder buildMatch() {
+        return new ${i.versioned_class(factory.version).name}.Builder();
+    }
+    //::     general_get_match_func_written = True
+    //:: #endif
     //:: if len(i.writeable_members) <= 2:
     public ${i.name} ${factory.interface.method_name(i, builder=False)}(${", ".join("%s %s" % (p.java_type.public_type, p.name) for p in i.writeable_members)}) {
         //::   if i.has_version(factory.version) and model.generate_class(i.versioned_class(factory.version)):