Interface InstrumentationFilter

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface InstrumentationFilter
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    shouldInstrument(@NonNull Object instance, @NonNull Method method, @NonNull Object[] args)
    Invoked prior to a method invocation, allowing control whether the invocation will be instrumented.
  • Method Details

    • shouldInstrument

      boolean shouldInstrument(@NonNull Object instance, @NonNull Method method, @NonNull Object[] args)
      Invoked prior to a method invocation, allowing control whether the invocation will be instrumented.
      Parameters:
      method - the Method corresponding to the interface method invoked on the instance.
      args - an array of objects containing the values of the arguments passed in the method invocation on the instance, or empty array if interface method takes no arguments. Arguments of primitive types are wrapped in instances of the appropriate primitive wrapper class, such as java.lang.Integer or java.lang.Boolean.
      Returns:
      true if invocation should be instrumented, false if invocation should not be instrumented