Files
VoidLoaderCore/include/class_transformer.h
T
faumaray 6527ef9d69
VoidLoader/VoidLoaderCore/pipeline/head There was a failure building this commit
trying to migrate
Signed-off-by: Faumaray <faumaray@gmail.com>
2025-10-19 02:59:05 +03:00

23 lines
993 B
C++

#pragma once
#include <jvmti.h>
#include <string>
class ClassTransformer {
public:
static void JNICALL classFileLoadHook(jvmtiEnv* jvmti, JNIEnv* jni,
jclass class_being_redefined,
jobject loader, const char* name,
jobject protection_domain,
jint class_data_len,
const unsigned char* class_data,
jint* new_class_data_len,
unsigned char** new_class_data);
private:
static bool shouldTransform(const std::string& class_name);
static bool transformClass(jvmtiEnv* jvmti,
const unsigned char* original_data,
jint original_len,
unsigned char** new_data,
jint* new_len);
};