private List < StackManipulation > argumentValuesOf ( MethodDescription instrumentedMethod ) { TypeList . Generic parameterTypes = instrumentedMethod . getParameters ( ) . asTypeList ( ) ; List < StackManipulation > instruction = new ArrayList < StackManipulation > ( parameterTypes . size ( ) ) ; int currentIndex = 1 ; for ( TypeDescription . Generic parameterType : parameterTypes ) { instruction . add ( new StackManipulation . Compound ( MethodVariableAccess . of ( parameterType ) . loadFrom ( currentIndex ) , assigner . assign ( parameterType , TypeDescription . Generic . OBJECT , Assigner . Typing . STATIC ) ) ) ; currentIndex += parameterType . getStackSize ( ) . getSize ( ) ; } return instruction ; }
Returns a list of stack manipulations that loads all arguments of an instrumented method .