@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);

            InstrumentMethod execute = target.getDeclaredMethod("execute", "org.apache.http.HttpRequest", "org.apache.http.HttpClientConnection", "org.apache.http.protocol.HttpContext");
            if (execute != null) {
                execute.addScopedInterceptor(HttpRequestExecutorExecuteMethodInterceptor.class, HttpClient4Constants.HTTP_CLIENT4_SCOPE, ExecutionPolicy.ALWAYS);
            }

            InstrumentMethod doSendRequest = target.getDeclaredMethod("doSendRequest", "org.apache.http.HttpRequest", "org.apache.http.HttpClientConnection", "org.apache.http.protocol.HttpContext");
            if (doSendRequest != null) {
                doSendRequest.addScopedInterceptor(HttpRequestExecutorDoSendRequestAndDoReceiveResponseMethodInterceptor.class, HttpClient4Constants.HTTP_CLIENT4_SCOPE, ExecutionPolicy.ALWAYS);
            }

            InstrumentMethod doReceiveResponse = target.getDeclaredMethod("doReceiveResponse", "org.apache.http.HttpRequest", "org.apache.http.HttpClientConnection", "org.apache.http.protocol.HttpContext");
            if (doReceiveResponse != null) {
                doReceiveResponse.addScopedInterceptor(HttpRequestExecutorDoSendRequestAndDoReceiveResponseMethodInterceptor.class, HttpClient4Constants.HTTP_CLIENT4_SCOPE, ExecutionPolicy.ALWAYS);
            }

            return target.toBytecode();
        }
@author netspider
@author emeroad
@author minwoo.jung
@author jaehong.kim
agent-module/plugins/httpclient4/src/main/java/com/navercorp/pinpoint/plugin/httpclient4/HttpClient4Plugin.java