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

            if (!target.isInterceptable()) {
                return null;
            }

            target.addField(DatabaseInfoAccessor.class);

            InstrumentMethod constructor1 = target.getConstructor("java.lang.String");
            if (constructor1 != null) {
                constructor1.addInterceptor(ClickHouseConnectionCreateInterceptor.class);
            }
            InstrumentMethod constructor2 = target.getConstructor("java.lang.String", "java.util.Properties");
            if (constructor2 != null) {
                constructor2.addInterceptor(ClickHouseConnectionCreateInterceptor.class);
            }
            InstrumentMethod constructor3 = target.getConstructor("com.clickhouse.jdbc.internal.ClickHouseJdbcUrlParser.ConnectionInfo");
            if (constructor3 != null) {
                constructor3.addInterceptor(ClickHouseConnectionCreateInterceptor.class);
            }

            // close
            InstrumentUtils.findMethod(target, "close")
                    .addScopedInterceptor(ConnectionCloseInterceptor.class, CLICK_HOUSE_SCOPE);

            // createStatement
            final Class<? extends Interceptor> statementCreate = StatementCreateInterceptor.class;
            InstrumentUtils.findMethod(target, "createStatement", "int", "int", "int")
                    .addScopedInterceptor(statementCreate, CLICK_HOUSE_SCOPE);
            // preparedStatement
            final Class<? extends Interceptor> preparedStatementCreate = PreparedStatementCreateInterceptor.class;
            InstrumentUtils.findMethod(target, "prepareStatement", "java.lang.String", "int", "int", "int")
                    .addScopedInterceptor(preparedStatementCreate, CLICK_HOUSE_SCOPE);

            // prepareCall not implemented in ClickHouse

            if (config.isProfileSetAutoCommit()) {
                InstrumentUtils.findMethod(target, "setAutoCommit", "boolean")
                        .addScopedInterceptor(TransactionSetAutoCommitInterceptor.class, CLICK_HOUSE_SCOPE);
            }
            if (config.isProfileCommit()) {
                InstrumentUtils.findMethod(target, "commit")
                        .addScopedInterceptor(TransactionCommitInterceptor.class, CLICK_HOUSE_SCOPE);
            }

            if (config.isProfileRollback()) {
                InstrumentUtils.findMethod(target, "rollback")
                        .addScopedInterceptor(TransactionRollbackInterceptor.class, CLICK_HOUSE_SCOPE);
            }

            return target.toBytecode();
        }
@author Jongho Moon
@author HyunGil Jeong
agent-module/plugins/clickhouse-jdbc/src/main/java/com/navercorp/pinpoint/plugin/jdbc/clickhouse/ClickHousePlugin.java