Package jadex.bytecode.vmhacks
Class VmHacks
java.lang.Object
jadex.bytecode.vmhacks.VmHacks
Class providing various means of getting around VM restrictions.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classInstrumentation command issued to the instrumentation agent.static final classAccess to unsafe operations. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic booleanSet to true to see debug infos during startup.static booleanGlobally disable all VM Hacks.static booleanDisable all instrumentation-based functionality.static booleanGlobally disable native functionality.static booleanGlobally disable setAccessible VM Hacks. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final VmHacks.Unsafeget()Provides access to unsafe operations.protected static final voidinjectClassIntoStore(Map<Object[], Class<?>> classstore, ClassLoader cl, String classname, Class<?> clazz) Trampoline function for injection into the class redefinition store.
-
Field Details
-
DISABLE
public static boolean DISABLEGlobally disable all VM Hacks. -
DISABLE_SETACCESSIBLE
public static boolean DISABLE_SETACCESSIBLEGlobally disable setAccessible VM Hacks. -
DISABLE_NATIVE
public static boolean DISABLE_NATIVEGlobally disable native functionality. -
DISABLE_INSTRUMENTATION
public static boolean DISABLE_INSTRUMENTATIONDisable all instrumentation-based functionality. -
DEBUG
public static boolean DEBUGSet to true to see debug infos during startup.
-
-
Constructor Details
-
VmHacks
public VmHacks()
-
-
Method Details
-
get
Provides access to unsafe operations.- Returns:
- The Unsafe object.
-
injectClassIntoStore
protected static final void injectClassIntoStore(Map<Object[], Class<?>> classstore, ClassLoader cl, String classname, Class<?> clazz) Trampoline function for injection into the class redefinition store. This allows the stack trace to come from VmHacks instead of VmHacks$Unsafe, avoiding potential inner class naming inconsistencies.- Parameters:
classstore- The class store.cl- The targeted classloader.classname- Name of the class.clazz- The class.
-