Class AgentBuilder.Default.Transformation.SimpleMatcher

    • Constructor Detail

      • SimpleMatcher

        protected SimpleMatcher​(AgentBuilder.RawMatcher ignoreMatcher,
                                java.util.List<AgentBuilder.Default.Transformation> transformations)
        Creates a new simple matcher.
        Parameters:
        ignoreMatcher - Identifies types that should not be instrumented.
        transformations - The transformations to apply on non-ignored types.
    • Method Detail

      • matches

        public boolean matches​(TypeDescription typeDescription,
                               java.lang.ClassLoader classLoader,
                               JavaModule module,
                               java.lang.Class<?> classBeingRedefined,
                               java.security.ProtectionDomain protectionDomain)
        Decides if the given typeDescription should be instrumented with the entailed AgentBuilder.Transformers.
        Specified by:
        matches in interface AgentBuilder.RawMatcher
        Parameters:
        typeDescription - A description of the type to be instrumented.
        classLoader - The class loader of the instrumented type. Might be null if this class loader represents the bootstrap class loader.
        module - The transformed type's module or null if the current VM does not support modules.
        classBeingRedefined - The class being redefined which is only not null if a retransformation is applied.
        protectionDomain - The protection domain of the type being transformed.
        Returns:
        true if the entailed AgentBuilder.Transformers should be applied for the given typeDescription.