throw new RuntimeException("Code attribute is empty for method " + method.getName() + " " + method.getDescriptor());
throw new RuntimeException("Code attribute is empty for method " + method.getName() + " " + method.getDescriptor());
throw new RuntimeException("Code attribute is empty for method " + method.getName() + " " + method.getDescriptor());
throw new RuntimeException("Code attribute is empty for method " + method.getName() + " " + method.getDescriptor());
throw new RuntimeException("Code attribute is empty for method " + method.getName() + " " + method.getDescriptor());
/** * Adds the following code to a delegating method: * <p/> * <code> * if(!this.constructed) return super.thisMethod() * </code> * <p/> * This means that the proxy will not start to delegate to the underlying * bean instance until after the constructor has finished. */ protected void addConstructedGuardToMethodBody(final ClassMethod classMethod, String className) { if (!useConstructedFlag()) { return; } // now create the conditional final CodeAttribute cond = classMethod.getCodeAttribute(); cond.aload(0); cond.getfield(classMethod.getClassFile().getName(), CONSTRUCTED_FLAG_NAME, BytecodeUtils.BOOLEAN_CLASS_DESCRIPTOR); // jump if the proxy constructor has finished BranchEnd jumpMarker = cond.ifne(); // generate the invokespecial call to the super class method // this is run when the proxy is being constructed cond.aload(0); cond.loadMethodParameters(); cond.invokespecial(className, classMethod.getName(), classMethod.getDescriptor()); cond.returnInstruction(); cond.branchEnd(jumpMarker); }
/** * Adds the following code to a delegating method: * <p/> * <code> * if(!this.constructed) return super.thisMethod() * </code> * <p/> * This means that the proxy will not start to delegate to the underlying * bean instance until after the constructor has finished. */ protected void addConstructedGuardToMethodBody(final ClassMethod classMethod, String className) { if (!useConstructedFlag()) { return; } // now create the conditional final CodeAttribute cond = classMethod.getCodeAttribute(); cond.aload(0); cond.getfield(classMethod.getClassFile().getName(), CONSTRUCTED_FLAG_NAME, BytecodeUtils.BOOLEAN_CLASS_DESCRIPTOR); // jump if the proxy constructor has finished BranchEnd jumpMarker = cond.ifne(); // generate the invokespecial call to the super class method // this is run when the proxy is being constructed cond.aload(0); cond.loadMethodParameters(); cond.invokespecial(className, classMethod.getName(), classMethod.getDescriptor()); cond.returnInstruction(); cond.branchEnd(jumpMarker); }
/** * Adds the following code to a delegating method: * <p/> * <code> * if(!this.constructed) return super.thisMethod() * </code> * <p/> * This means that the proxy will not start to delegate to the underlying * bean instance until after the constructor has finished. */ protected void addConstructedGuardToMethodBody(final ClassMethod classMethod, String className) { if (!useConstructedFlag()) { return; } // now create the conditional final CodeAttribute cond = classMethod.getCodeAttribute(); cond.aload(0); cond.getfield(classMethod.getClassFile().getName(), CONSTRUCTED_FLAG_NAME, BytecodeUtils.BOOLEAN_CLASS_DESCRIPTOR); // jump if the proxy constructor has finished BranchEnd jumpMarker = cond.ifne(); // generate the invokespecial call to the super class method // this is run when the proxy is being constructed cond.aload(0); cond.loadMethodParameters(); cond.invokespecial(className, classMethod.getName(), classMethod.getDescriptor()); cond.returnInstruction(); cond.branchEnd(jumpMarker); }
/** * Adds the following code to a delegating method: * <p/> * <code> * if(!this.constructed) return super.thisMethod() * </code> * <p/> * This means that the proxy will not start to delegate to the underlying * bean instance until after the constructor has finished. */ protected void addConstructedGuardToMethodBody(final ClassMethod classMethod, String className) { if (!useConstructedFlag()) { return; } // now create the conditional final CodeAttribute cond = classMethod.getCodeAttribute(); cond.aload(0); cond.getfield(classMethod.getClassFile().getName(), CONSTRUCTED_FLAG_NAME, BytecodeUtils.BOOLEAN_CLASS_DESCRIPTOR); // jump if the proxy constructor has finished BranchEnd jumpMarker = cond.ifne(); // generate the invokespecial call to the super class method // this is run when the proxy is being constructed cond.aload(0); cond.loadMethodParameters(); cond.invokespecial(className, classMethod.getName(), classMethod.getDescriptor()); cond.returnInstruction(); cond.branchEnd(jumpMarker); }
/** * Adds the following code to a delegating method: * <p/> * <code> * if(!this.constructed) return super.thisMethod() * </code> * <p/> * This means that the proxy will not start to delegate to the underlying * bean instance until after the constructor has finished. */ protected void addConstructedGuardToMethodBody(final ClassMethod classMethod, String className) { if (!useConstructedFlag()) { return; } // now create the conditional final CodeAttribute cond = classMethod.getCodeAttribute(); cond.aload(0); cond.getfield(classMethod.getClassFile().getName(), CONSTRUCTED_FLAG_NAME, BytecodeUtils.BOOLEAN_CLASS_DESCRIPTOR); // jump if the proxy constructor has finished BranchEnd jumpMarker = cond.ifne(); // generate the invokespecial call to the super class method // this is run when the proxy is being constructed cond.aload(0); cond.loadMethodParameters(); cond.invokespecial(className, classMethod.getName(), classMethod.getDescriptor()); cond.returnInstruction(); cond.branchEnd(jumpMarker); }
/** * Adds the following code to a delegating method: * <p/> * <code> * if(!this.constructed) return super.thisMethod() * </code> * <p/> * This means that the proxy will not start to delegate to the underlying * bean instance until after the constructor has finished. */ protected void addConstructedGuardToMethodBody(final ClassMethod classMethod, String className) { if (!useConstructedFlag()) { return; } // now create the conditional final CodeAttribute cond = classMethod.getCodeAttribute(); cond.aload(0); cond.getfield(classMethod.getClassFile().getName(), CONSTRUCTED_FLAG_NAME, BytecodeUtils.BOOLEAN_CLASS_DESCRIPTOR); // jump if the proxy constructor has finished BranchEnd jumpMarker = cond.ifne(); // generate the invokespecial call to the super class method // this is run when the proxy is being constructed cond.aload(0); cond.loadMethodParameters(); cond.invokespecial(className, classMethod.getName(), classMethod.getDescriptor()); cond.returnInstruction(); cond.branchEnd(jumpMarker); }