title: ByteBuddy: Use new defined field in intercept during construction of class
body: <p>I am looking at some ByteBuddy code from someone else. He uses ByteBuddy to generate runtime subclasses which are used as proxies to implement some management code of his runtime into specific objects.</p>
  
  <pre><code>Class&lt;? extends T&gt; newSubClass = new ByteBuddy(ClassFileVersion.ofThisVm())
                  .subclass(classType)
                  .defineField("_core", Object.class, Visibility.PUBLIC) //&lt;---
                  .method(ElementMatchers.isDeclaredBy(classType))
                  .intercept(InvocationHandlerAdapter.of((proxy, method, m_args) -&gt; {
                      //TODO: Need to replace core with _core as core is a function argument and will make it bound
                      return proxyHandler(core, method, m_args); //&lt;--
                  }))
                  .make()
                  .load(roleType.getClassLoader(), ClassLoadingStrategy.Default.WRAPPER)
                  .getLoaded();
  
  
  T proxy = ReflectionHelper.newInstance(newSubClass, args);
  newSubClass.getField("_core").set(proxy, core);
  </code></pre>
  
  <p>In order to not bind the <code>core</code> object directly into the lambda I want to use the new defined field <code>_core</code>so I can reuse the generated class (and not regenerate it for every call of the function).
   Is there a way to achieve this?</p>
  
  <p>Thanks in advance.</p>