Class JavaModule.Dispatcher.Enabled.WithInstrumentationSupport

    • Field Detail

      • isModifiableModule

        private final java.lang.reflect.Method isModifiableModule
        The java.lang.instrument.Instrumentation#isModifiableModule method.
      • redefineModule

        private final java.lang.reflect.Method redefineModule
        The java.lang.instrument.Instrumentation#redefineModule method.
    • Constructor Detail

      • WithInstrumentationSupport

        protected WithInstrumentationSupport​(java.lang.reflect.Method getModule,
                                             java.lang.reflect.Method getClassLoader,
                                             java.lang.reflect.Method isNamed,
                                             java.lang.reflect.Method getName,
                                             java.lang.reflect.Method getResourceAsStream,
                                             java.lang.reflect.Method isExported,
                                             java.lang.reflect.Method isOpened,
                                             java.lang.reflect.Method canRead,
                                             java.lang.reflect.Method isModifiableModule,
                                             java.lang.reflect.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​(java.lang.instrument.Instrumentation instrumentation,
                           java.lang.Object source,
                           java.util.Set<java.lang.Object> reads,
                           java.util.Map<java.lang.String,​java.util.Set<java.lang.Object>> exports,
                           java.util.Map<java.lang.String,​java.util.Set<java.lang.Object>> opens,
                           java.util.Set<java.lang.Class<?>> uses,
                           java.util.Map<java.lang.Class<?>,​java.util.List<java.lang.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.