Package io.github.toolfactory.jvm
Interface Driver
- All Superinterfaces:
java.lang.AutoCloseable,java.io.Closeable
- All Known Implementing Classes:
DefaultDriver,DriverAbst,HybridDriver,NativeDriver
public interface Driver
extends java.io.Closeable
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classDriver.Factorystatic classDriver.InitializeExceptionstatic classDriver.InstantiateException -
Method Summary
Modifier and Type Method Description <T> TallocateInstance(java.lang.Class<?> cls)voidclose()java.lang.Class<?>defineHookClass(java.lang.Class<?> clientClass, byte[] byteCode)java.lang.Class<?>getBuiltinClassLoaderClass()java.lang.Class<?>getClassLoaderDelegateClass()java.lang.invoke.MethodHandles.LookupgetConsulter(java.lang.Class<?> cls)<T> java.lang.reflect.Constructor<T>[]getDeclaredConstructors(java.lang.Class<T> cls)java.lang.reflect.Field[]getDeclaredFields(java.lang.Class<?> cls)java.lang.reflect.Method[]getDeclaredMethods(java.lang.Class<?> cls)<T> TgetFieldValue(java.lang.Object target, java.lang.reflect.Field field)java.lang.PackagegetPackage(java.lang.ClassLoader classLoader, java.lang.String packageName)<T> Tinvoke(java.lang.reflect.Method method, java.lang.Object target, java.lang.Object[] params)booleanisBuiltinClassLoader(java.lang.ClassLoader classLoader)booleanisClassLoaderDelegate(java.lang.ClassLoader classLoader)<T> TnewInstance(java.lang.reflect.Constructor<T> ctor, java.lang.Object[] params)ClenableSupplier<java.util.Collection<java.lang.Class<?>>>retrieveLoadedClasses(java.lang.ClassLoader classLoader)java.util.Map<java.lang.String,?>retrieveLoadedPackages(java.lang.ClassLoader classLoader)voidsetAccessible(java.lang.reflect.AccessibleObject object, boolean flag)voidsetFieldValue(java.lang.Object target, java.lang.reflect.Field field, java.lang.Object value)<T> TthrowException(java.lang.Object exceptionOrMessage, java.lang.Object... placeHolderReplacements)
-
Method Details
-
allocateInstance
<T> T allocateInstance(java.lang.Class<?> cls) -
defineHookClass
java.lang.Class<?> defineHookClass(java.lang.Class<?> clientClass, byte[] byteCode) -
getBuiltinClassLoaderClass
java.lang.Class<?> getBuiltinClassLoaderClass() -
getClassLoaderDelegateClass
java.lang.Class<?> getClassLoaderDelegateClass() -
getConsulter
java.lang.invoke.MethodHandles.Lookup getConsulter(java.lang.Class<?> cls) -
getDeclaredConstructors
<T> java.lang.reflect.Constructor<T>[] getDeclaredConstructors(java.lang.Class<T> cls) -
getDeclaredFields
java.lang.reflect.Field[] getDeclaredFields(java.lang.Class<?> cls) -
getDeclaredMethods
java.lang.reflect.Method[] getDeclaredMethods(java.lang.Class<?> cls) -
getFieldValue
<T> T getFieldValue(java.lang.Object target, java.lang.reflect.Field field) -
getPackage
java.lang.Package getPackage(java.lang.ClassLoader classLoader, java.lang.String packageName) -
invoke
<T> T invoke(java.lang.reflect.Method method, java.lang.Object target, java.lang.Object[] params) -
isBuiltinClassLoader
boolean isBuiltinClassLoader(java.lang.ClassLoader classLoader) -
isClassLoaderDelegate
boolean isClassLoaderDelegate(java.lang.ClassLoader classLoader) -
newInstance
<T> T newInstance(java.lang.reflect.Constructor<T> ctor, java.lang.Object[] params) -
retrieveLoadedClasses
ClenableSupplier<java.util.Collection<java.lang.Class<?>>> retrieveLoadedClasses(java.lang.ClassLoader classLoader) -
retrieveLoadedPackages
java.util.Map<java.lang.String,?> retrieveLoadedPackages(java.lang.ClassLoader classLoader) -
setAccessible
void setAccessible(java.lang.reflect.AccessibleObject object, boolean flag) -
setFieldValue
void setFieldValue(java.lang.Object target, java.lang.reflect.Field field, java.lang.Object value) -
throwException
<T> T throwException(java.lang.Object exceptionOrMessage, java.lang.Object... placeHolderReplacements) -
close
void close()- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable
-