Package jadex.bytecode.vmhacks
Interface INativeHelper
- 
- All Known Implementing Classes:
- NativeHelper
 
 public interface INativeHelperInterface for classes implementing native helper functions. Used for utility. Various methods are used to get around restrictions, this is one of them. Therefore, do not use this directly, use VmHacks.get().
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancanSetAccessible()Tests if the setAccessible() method can be used.java.lang.Class<?>defineClass(java.lang.String name, byte[] b, java.lang.ClassLoader loader)Define a class in any ClassLoader.voidsetAccessible(java.lang.String flagname, java.lang.reflect.AccessibleObject accobj, boolean flag)Sets reflective object accessible without checks.booleanstartInstrumentationAgent(java.lang.String jarfile)Method for starting an instrumentation agent.booleantryChangeUser(java.lang.String username)Attempts to change the user of the process to the given name.
 
- 
- 
- 
Method Detail- 
tryChangeUserboolean tryChangeUser(java.lang.String username) Attempts to change the user of the process to the given name.- Parameters:
- username- The target user name.
- Returns:
- True, if successful, false if the attempt probably failed.
 
 - 
setAccessiblevoid setAccessible(java.lang.String flagname, java.lang.reflect.AccessibleObject accobj, boolean flag)Sets reflective object accessible without checks.- Parameters:
- accobj- The accessible object.
- flag- The flag value.
 
 - 
canSetAccessibleboolean canSetAccessible() Tests if the setAccessible() method can be used.- Returns:
- True, if method can be used.
 
 - 
defineClassjava.lang.Class<?> defineClass(java.lang.String name, byte[] b, java.lang.ClassLoader loader)Define a class in any ClassLoader.
 - 
startInstrumentationAgentboolean startInstrumentationAgent(java.lang.String jarfile) Method for starting an instrumentation agent.- Parameters:
- jarfile- The path to the jar file of the agent.
- Returns:
- True, on successful start.
 
 
- 
 
-