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 class
Instrumentation command issued to the instrumentation agent.static final class
Access to unsafe operations. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic boolean
Set to true to see debug infos during startup.static boolean
Globally disable all VM Hacks.static boolean
Disable all instrumentation-based functionality.static boolean
Globally disable native functionality.static boolean
Globally disable setAccessible VM Hacks. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final VmHacks.Unsafe
get()
Provides access to unsafe operations.protected static final void
injectClassIntoStore
(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.
-