Update byte-buddy integration
[mdsal.git] / binding / mdsal-binding-dom-codec / src / main / java / org / opendaylight / mdsal / binding / dom / codec / impl / ByteBuddyUtils.java
index c5bdc771b5b4dd8a3bcdedb86b9cedc45df01525..7ae3ae88546952bfcda94a18bcfc63da1f1d564b 100644 (file)
@@ -33,12 +33,17 @@ import net.bytebuddy.matcher.ElementMatchers;
 import net.bytebuddy.pool.TypePool;
 
 final class ByteBuddyUtils {
-    static final StackManipulation THIS = MethodVariableAccess.loadThis();
+    private static final StackManipulation LOAD_THIS = MethodVariableAccess.loadThis();
 
     private ByteBuddyUtils() {
 
     }
 
+    // TODO: eliminate this method once MethodVariableAccess.loadThis() returns a singleton
+    static StackManipulation loadThis() {
+        return LOAD_THIS;
+    }
+
     static StackManipulation invokeMethod(final Method method) {
         return MethodInvocation.invoke(describe(method));
     }
@@ -59,10 +64,6 @@ final class ByteBuddyUtils {
         return new Mark(label);
     }
 
-    static StackManipulation loadThis() {
-        return THIS;
-    }
-
     static StackManipulation getField(final Field field) {
         return FieldAccess.forField(new ForLoadedField(field).asDefined()).read();
     }