Package jadex.bytecode.vmhacks
Class VmHacks
- java.lang.Object
-
- jadex.bytecode.vmhacks.VmHacks
-
public class VmHacks extends java.lang.ObjectClass providing various means of getting around VM restrictions.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classVmHacks.InstrumentationCommandInstrumentation command issued to the instrumentation agent.static classVmHacks.UnsafeAccess to unsafe operations.
-
Field Summary
Fields Modifier and Type Field Description static booleanDEBUGSet to true to see debug infos during startup.static booleanDISABLEGlobally disable all VM Hacks.static booleanDISABLE_INSTRUMENTATIONDisable all instrumentation-based functionality.static booleanDISABLE_NATIVEGlobally disable native functionality.static booleanDISABLE_SETACCESSIBLEGlobally disable setAccessible VM Hacks.
-
Constructor Summary
Constructors Constructor Description VmHacks()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static VmHacks.Unsafeget()Provides access to unsafe operations.protected static voidinjectClassIntoStore(java.util.Map<java.lang.Object[],java.lang.Class<?>> classstore, java.lang.ClassLoader cl, java.lang.String classname, java.lang.Class<?> clazz)Trampoline function for injection into the class redefinition store.
-
-
-
Field Detail
-
DISABLE
public static boolean DISABLE
Globally disable all VM Hacks.
-
DISABLE_SETACCESSIBLE
public static boolean DISABLE_SETACCESSIBLE
Globally disable setAccessible VM Hacks.
-
DISABLE_NATIVE
public static boolean DISABLE_NATIVE
Globally disable native functionality.
-
DISABLE_INSTRUMENTATION
public static boolean DISABLE_INSTRUMENTATION
Disable all instrumentation-based functionality.
-
DEBUG
public static boolean DEBUG
Set to true to see debug infos during startup.
-
-
Method Detail
-
get
public static final VmHacks.Unsafe get()
Provides access to unsafe operations.- Returns:
- The Unsafe object.
-
injectClassIntoStore
protected static final void injectClassIntoStore(java.util.Map<java.lang.Object[],java.lang.Class<?>> classstore, java.lang.ClassLoader cl, java.lang.String classname, java.lang.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.
-
-