Enum AgentBuilder.RawMatcher.Trivial

java.lang.Object
java.lang.Enum<AgentBuilder.RawMatcher.Trivial>
net.bytebuddy.agent.builder.AgentBuilder.RawMatcher.Trivial
All Implemented Interfaces:
Serializable, Comparable<AgentBuilder.RawMatcher.Trivial>, java.lang.constant.Constable, AgentBuilder.RawMatcher
Enclosing interface:
AgentBuilder.RawMatcher

public static enum AgentBuilder.RawMatcher.Trivial extends Enum<AgentBuilder.RawMatcher.Trivial> implements AgentBuilder.RawMatcher
A matcher that always or never matches a type.
  • Enum Constant Details

  • Field Details

    • matches

      private final boolean matches
      true if this matcher always matches a type.
  • Constructor Details

    • Trivial

      private Trivial(boolean matches)
      Creates a new trivial raw matcher.
      Parameters:
      matches - true if this matcher always matches a type.
  • Method Details

    • values

      public static AgentBuilder.RawMatcher.Trivial[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static AgentBuilder.RawMatcher.Trivial valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • matches

      public boolean matches(TypeDescription typeDescription, @MaybeNull ClassLoader classLoader, @MaybeNull JavaModule module, @MaybeNull Class<?> classBeingRedefined, @MaybeNull 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 or null if none is available.
      Returns:
      true if the entailed AgentBuilder.Transformers should be applied for the given typeDescription.