@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 m : target.getDeclaredMethods(MethodFilters.name("parse"))) {
                m.addScopedInterceptor(ParseInterceptor.class, FastjsonConstants.SCOPE);
            }

            for (InstrumentMethod m : target.getDeclaredMethods(MethodFilters.name("parseObject"))) {
                m.addScopedInterceptor(ParseObjectInterceptor.class, FastjsonConstants.SCOPE);
            }

            for (InstrumentMethod m : target.getDeclaredMethods(MethodFilters.name("parseArray"))) {
                m.addScopedInterceptor(ParseArrayInterceptor.class, FastjsonConstants.SCOPE);
            }

            for (InstrumentMethod m : target.getDeclaredMethods(MethodFilters.name("toJSON"))) {
                m.addScopedInterceptor(ToJsonInterceptor.class, FastjsonConstants.SCOPE);
            }

            for (InstrumentMethod m : target.getDeclaredMethods(MethodFilters.name("toJavaObject"))) {
                m.addScopedInterceptor(ToJavaObjectInterceptor.class, FastjsonConstants.SCOPE);
            }

            for (InstrumentMethod m : target.getDeclaredMethods(MethodFilters.name("toJSONString"))) {
                m.addScopedInterceptor(ToJsonStringInterceptor.class, FastjsonConstants.SCOPE);
            }

            for (InstrumentMethod m : target.getDeclaredMethods(MethodFilters.name("toJSONBytes"))) {
                m.addScopedInterceptor(ToJsonBytesInterceptor.class, FastjsonConstants.SCOPE);
            }

            for (InstrumentMethod m : target.getDeclaredMethods(MethodFilters.name("writeJSONString"))) {
                m.addScopedInterceptor(WriteJsonStringInterceptor.class, FastjsonConstants.SCOPE);
            }

            return target.toBytecode();
        }
The type Fastjson plugin.

@author Victor.Zxy
@version 1.8.1
@since 2017/07/17
agent-module/plugins/fastjson/src/main/java/com/navercorp/pinpoint/plugin/fastjson/FastjsonPlugin.java