Class AgentBuilder.Listener.ModuleReadEdgeCompleting

    • Constructor Detail

      • ModuleReadEdgeCompleting

        public ModuleReadEdgeCompleting​(Instrumentation instrumentation,
                                        boolean addTargetEdge,
                                        Set<? extends JavaModule> modules)
        Creates a new module read-edge completing listener.
        Parameters:
        instrumentation - The instrumentation instance used for adding read edges.
        addTargetEdge - true if the listener should also add a read-edge from the supplied modules to the instrumented type's module. This will also ensure that the package of the instrumented type is exported to the target module.
        modules - The modules to add as a read edge to any transformed class's module.
    • Method Detail

      • of

        public static AgentBuilder.Listener of​(Instrumentation instrumentation,
                                               boolean addTargetEdge,
                                               Class<?>... type)
        Resolves a listener that adds module edges from and to the instrumented type's module.
        Parameters:
        instrumentation - The instrumentation instance used for adding read edges.
        addTargetEdge - true if the listener should also add a read-edge from the supplied modules to the instrumented type's module. This will also ensure that the package of the instrumented type is exported to the target module.
        type - The types for which to extract the modules.
        Returns:
        An appropriate listener.