@Override
    public byte[] transform(ClassLoader loader, String className, Class<?> classBeingRedefined,
                            ProtectionDomain protectionDomain, byte[] classfileBuffer)
            throws IllegalClassFormatException {
        if (classesToEnhance.contains(classBeingRedefined)) {
            dumpClassIfNecessary(classBeingRedefined, classfileBuffer);
        }
        return null;
    }
referer https://github.com/alibaba/arthas/blob/master/core/src/main/java/com/taobao/arthas/core/command/klass100/ClassDumpTransformer.java
agent/src/main/java/code/landgrey/copagent/common/ClassDumpTransformer.java