protected ByteCodeAppender . Size apply ( MethodVisitor methodVisitor , Context implementationContext , MethodDescription instrumentedMethod , TypeDescription . Generic fixedValueType , StackManipulation valueLoadingInstruction ) { StackManipulation assignment = assigner . assign ( fixedValueType , instrumentedMethod . getReturnType ( ) , typing ) ; if ( ! assignment . isValid ( ) ) { throw new IllegalArgumentException ( "Cannot return value of type " + fixedValueType + " for " + instrumentedMethod ) ; } StackManipulation . Size stackSize = new StackManipulation . Compound ( valueLoadingInstruction , assignment , MethodReturn . of ( instrumentedMethod . getReturnType ( ) ) ) . apply ( methodVisitor , implementationContext ) ; return new ByteCodeAppender . Size ( stackSize . getMaximalSize ( ) , instrumentedMethod . getStackSize ( ) ) ; }
Blueprint method that for applying the actual implementation .