code: @Override
    public byte[] transform(
        ClassLoader loader,
        String className,
        Class<?> classBeingRedefined,
        ProtectionDomain protectionDomain,
        byte[] classfileBuffer) {
      if ((classBeingRedefined == null) || (!samplerMap.containsKey(classBeingRedefined))) {
        return null;
      }
      if (!AllocationInstrumenter.canRewriteClass(className, loader)) {
        throw new RuntimeException(new UnmodifiableClassException("cannot instrument " + className));
      }
      return instrument(classfileBuffer, classBeingRedefined);
    }
docs: {@inheritDoc}