@Override
        public byte[] doInTransform(Instrumentor instrumentor, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
            InstrumentClass target = instrumentor.getInstrumentClass(loader, className, classfileBuffer);

            for (InstrumentMethod publicApi : target.getDeclaredMethods(RabbitMQUtils.getPublicApiFilter())) {
                publicApi.addScopedInterceptor(BasicMethodInterceptor.class, va(RabbitMQClientConstants.RABBITMQ_CLIENT_INTERNAL), RabbitMQClientConstants.RABBITMQ_TEMPLATE_API_SCOPE);
            }
            InstrumentMethod invoke = target.getDeclaredMethod("invoke", "org.springframework.amqp.rabbit.core.RabbitOperations$OperationsCallback");
            if (invoke != null) {
                invoke.addInterceptor(BasicMethodInterceptor.class, va(RabbitMQClientConstants.RABBITMQ_CLIENT_INTERNAL));
            }

            final RabbitMQClientPluginConfig config = new RabbitMQClientPluginConfig(instrumentor.getProfilerConfig());
            final boolean traceConsumer = config.isTraceRabbitMQClientConsumer();
            if (traceConsumer) {
                // Internal consumer implementations
                if (!RabbitMQUtils.addConsumerHandleDeliveryInterceptor(target)) {
                    // Check inner classes for consumer implementations
                    for (InstrumentClass potentialConsumer : target.getNestedClasses(ClassFilters.ACCEPT_ALL)) {
                        if (potentialConsumer.hasMethod("handleDelivery", "java.lang.String", "com.rabbitmq.client.Envelope", "com.rabbitmq.client.AMQP$BasicProperties", "byte[]")) {
                            instrumentor.transform(loader, potentialConsumer.getName(), PotentialConsumerTransform.class);
                        }
                    }
                }
            }

            return target.toBytecode();
        }
@author Jinkai.Ma
@author Jiaqi Feng
@author HyunGil Jeong
agent-module/plugins/rabbitmq/src/main/java/com/navercorp/pinpoint/plugin/rabbitmq/client/RabbitMQClientPlugin.java