Class JavaModule.Dispatcher.Enabled.WithInstrumentationSupport

    • Constructor Detail

      • WithInstrumentationSupport

        protected WithInstrumentationSupport​(Method getModule,
                                             Method getClassLoader,
                                             Method isNamed,
                                             Method getName,
                                             Method getResourceAsStream,
                                             Method isExported,
                                             Method isOpened,
                                             Method canRead,
                                             Method isModifiableModule,
                                             Method redefineModule)
        Creates an enabled dispatcher.
        Parameters:
        getModule - The java.lang.Class#getModule() method.
        getClassLoader - The java.lang.Module#getClassLoader() method.
        isNamed - The java.lang.Module#isNamed() method.
        getName - The java.lang.Module#getName() method.
        getResourceAsStream - The java.lang.Module#getResourceAsStream(String) method.
        isExported - The java.lang.Module#isExported(String,Module) method.
        isOpened - The java.lang.Module#isOpened(String,Module) method.
        canRead - The java.lang.Module#canRead(Module) method.
        isModifiableModule - The java.lang.instrument.Instrumentation#isModifiableModule method.
        redefineModule - The java.lang.instrument.Instrumentation#redefineModule method.
    • Method Detail

      • modify

        public void modify​(Instrumentation instrumentation,
                           Object source,
                           Set<Object> reads,
                           Map<String,​Set<Object>> exports,
                           Map<String,​Set<Object>> opens,
                           Set<Class<?>> uses,
                           Map<Class<?>,​List<Class<?>>> provides)
        Modifies this module's properties.
        Parameters:
        instrumentation - The instrumentation instace to use for applying the modification.
        source - The module to modify.
        reads - A set of additional modules this module should read.
        exports - A map of packages to export to a set of modules.
        opens - A map of packages to open to a set of modules.
        uses - A set of provider interfaces to use by this module.
        provides - A map of provider interfaces to provide by this module mapped to the provider implementations.