Enum ClassInjector.UsingInstrumentation.Target

java.lang.Object
java.lang.Enum<ClassInjector.UsingInstrumentation.Target>
net.bytebuddy.dynamic.loading.ClassInjector.UsingInstrumentation.Target
All Implemented Interfaces:
Serializable, Comparable<ClassInjector.UsingInstrumentation.Target>, java.lang.constant.Constable
Enclosing class:
ClassInjector.UsingInstrumentation

public static enum ClassInjector.UsingInstrumentation.Target extends Enum<ClassInjector.UsingInstrumentation.Target>
A representation of the target to which Java classes should be appended to.
  • Enum Constant Details

  • Field Details

  • Constructor Details

    • Target

      private Target(@MaybeNull ClassLoader classLoader)
      Creates a new injection target.
      Parameters:
      classLoader - The class loader to load classes from.
  • Method Details

    • 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 ClassInjector.UsingInstrumentation.Target 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
    • getClassLoader

      @MaybeNull protected ClassLoader getClassLoader()
      Returns the class loader to load classes from.
      Returns:
      The class loader to load classes from.
    • inject

      protected abstract void inject(Instrumentation instrumentation, JarFile jarFile)
      Adds the given classes to the represented class loader.
      Parameters:
      instrumentation - The instrumentation instance to use.
      jarFile - The jar file to append.