Interface ClassInjector.UsingInstrumentation.Dispatcher

Enclosing class:
ClassInjector.UsingInstrumentation

@Proxied("java.lang.instrument.Instrumentation") protected static interface ClassInjector.UsingInstrumentation.Dispatcher
A dispatcher to interact with the instrumentation API.
  • Method Details

    • appendToBootstrapClassLoaderSearch

      void appendToBootstrapClassLoaderSearch(Instrumentation instrumentation, JarFile jarFile)
      Appends a jar file to the bootstrap class loader.
      Parameters:
      instrumentation - The instrumentation instance to interact with.
      jarFile - The jar file to append.
    • appendToSystemClassLoaderSearch

      void appendToSystemClassLoaderSearch(Instrumentation instrumentation, JarFile jarFile)
      Appends a jar file to the system class loader.
      Parameters:
      instrumentation - The instrumentation instance to interact with.
      jarFile - The jar file to append.
    • isModifiableModule

      boolean isModifiableModule(Instrumentation instrumentation, @Proxied("java.lang.Module") Object module)
      Checks if a module is modifiable.
      Parameters:
      instrumentation - The instrumentation instance to use for checking for modifiability.
      module - The java.lang.Module to examine.
      Returns:
      true if the supplied module is modifiable.
    • redefineModule

      void redefineModule(Instrumentation instrumentation, @Proxied("java.lang.Module") Object module, Set<?> reads, Map<String,Set<?>> exports, Map<String,Set<?>> opens, Set<Class<?>> uses, Map<Class<?>,List<Class<?>>> provides)
      Redefines an existing module.
      Parameters:
      instrumentation - The instrumentation instance to redefine.
      module - The java.lang.Module to redefine.
      reads - A set of java.lang.Modules that are to be read additionally.
      exports - A map of packages to a set of java.lang.Modules to read additionally.
      opens - A map of packages to a set of java.lang.Modules to open to additionally.
      uses - A list of types to use additionally.
      provides - A list of types to their implementations to offer additionally.