FieldAccess.forField(fieldDescription).read(), MethodVariableAccess.loadThis(), cached ? methodConstant.cached() : methodConstant, ArrayFactory.forType(TypeDescription.Generic.OBJECT).withValues(argumentValuesOf(instrumentedMethod)), MethodInvocation.invoke(INVOCATION_HANDLER_TYPE.getDeclaredMethods().getOnly()),
/** * Loads a method constant onto the operand stack. * * @param origin The origin annotation. * @param methodDescription The method description to load. * @return An appropriate stack manipulation. */ private static StackManipulation methodConstant(Origin origin, MethodDescription.InDefinedShape methodDescription) { MethodConstant.CanCache methodConstant = origin.privileged() ? MethodConstant.ofPrivileged(methodDescription) : MethodConstant.of(methodDescription); return origin.cache() ? methodConstant.cached() : methodConstant; }