Class AgentBuilder.RedefinitionListenable.ResubmissionImmediateMatcher.ForElementMatchers

    • Field Detail

      • typeNameMatcher

        private final ElementMatcher<java.lang.String> typeNameMatcher
        The matcher to use for the instrumented type's name.
      • classLoaderMatcher

        private final ElementMatcher<? super java.lang.ClassLoader> classLoaderMatcher
        The matcher to use for the instrumented type's class loader.
      • moduleMatcher

        private final ElementMatcher<? super JavaModule> moduleMatcher
        The matcher to use for the instrumented type's module.
    • Constructor Detail

      • ForElementMatchers

        public ForElementMatchers​(ElementMatcher<java.lang.String> typeNameMatcher,
                                  ElementMatcher<? super java.lang.ClassLoader> classLoaderMatcher,
                                  ElementMatcher<? super JavaModule> moduleMatcher)
        Creates a new matcher for immediate resubmission that is using element matchers.
        Parameters:
        typeNameMatcher - The matcher to use for the instrumented type's name.
        classLoaderMatcher - The matcher to use for the instrumented type's class loader.
        moduleMatcher - The matcher to use for the instrumented type's module.
    • Method Detail

      • matches

        public boolean matches​(java.lang.String typeName,
                               java.lang.ClassLoader classLoader,
                               JavaModule module)
        Returns true if a type should be resubmitted if it is not yet loaded.
        Specified by:
        matches in interface AgentBuilder.RedefinitionListenable.ResubmissionImmediateMatcher
        Parameters:
        typeName - The name of the instrumented type.
        classLoader - The class loader of the instrumented type or null if the type is loaded by the bootstrap class loader.
        module - The module of the instrumented type or null if the current VM does not support modules.
        Returns:
        true if the type should be resubmitted.