code: public static void addConstructor(String returnType, String[] params, String[] exceptions, ClassFile file, List<DeferredBytecode> initialValueBytecode, final boolean useUnsafeInstantiators) {
          try {
  
              final String initMethodName = "<init>";
              final ClassMethod ctor = file.addMethod(AccessFlag.PUBLIC, initMethodName, returnType, params);
              ctor.addCheckedExceptions(exceptions);
              final CodeAttribute b = ctor.getCodeAttribute();
              for(final DeferredBytecode iv : initialValueBytecode) {
                  iv.apply(b);
              }
              // we need to generate a constructor with a single invokespecial call
              // to the super constructor
              // to do this we need to push all the arguments on the stack first
              // local variables is the number of parameters +1 for this
              // if some of the parameters are wide this may go up.
              b.aload(0);
              b.loadMethodParameters();
              // now we have the parameters on the stack
              b.invokespecial(file.getSuperclass(), initMethodName, methodDescriptor(params, returnType));
              if(!useUnsafeInstantiators) {
                  // now set constructed to true
                  b.aload(0);
                  b.iconst(1);
                  b.putfield(file.getName(), ProxyFactory.CONSTRUCTED_FLAG_NAME, BytecodeUtils.BOOLEAN_CLASS_DESCRIPTOR);
              }
              b.returnInstruction();
          }  catch (DuplicateMemberException e) {
              throw new RuntimeException(e);
          }
      }
docs: Adds a constructor that delegates to a super constructor with the same
  descriptor. The bytecode in initialValueBytecode will be executed at the
  start of the constructor and can be used to initialize fields to a default
  value. As the object is not properly constructed at this point this
  bytecode may not reference this (i.e. the variable at location 0)
  
  @param returnType           the constructor descriptor
  @param exceptions           any exceptions that are thrown
  @param file                 the classfile to add the constructor to
  @param initialValueBytecode bytecode that can be used to set initial values