Enum Class AgentBuilder.RawMatcher.ForLoadState

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

public static enum AgentBuilder.RawMatcher.ForLoadState extends Enum<AgentBuilder.RawMatcher.ForLoadState> implements AgentBuilder.RawMatcher
A raw matcher indicating the state of a type's class loading.
  • Enum Constant Details

  • Field Details

    • unloaded

      private final boolean unloaded
      true if a type is expected to be unloaded..
  • Constructor Details

    • ForLoadState

      private ForLoadState(boolean unloaded)
      Creates a new load state matcher.
      Parameters:
      unloaded - true if a type is expected to be unloaded..
  • Method Details

    • values

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

      public static AgentBuilder.RawMatcher.ForLoadState valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class 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, 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.