Class MemberSubstitution.TypePoolResolver.ForClassFileLocator

java.lang.Object
net.bytebuddy.asm.MemberSubstitution.TypePoolResolver.ForClassFileLocator
All Implemented Interfaces:
MemberSubstitution.TypePoolResolver
Enclosing interface:
MemberSubstitution.TypePoolResolver

@Enhance public static class MemberSubstitution.TypePoolResolver.ForClassFileLocator extends Object implements MemberSubstitution.TypePoolResolver
A type pool resolver that resolves the implicit pool but additionally checks another class file locator.
  • Field Details

  • Constructor Details

    • ForClassFileLocator

      public ForClassFileLocator(ClassFileLocator classFileLocator)
      Creates a new type pool resolver for a class file locator as a supplement of the implicit type pool.
      Parameters:
      classFileLocator - The class file locator to use.
    • ForClassFileLocator

      public ForClassFileLocator(ClassFileLocator classFileLocator, TypePool.Default.ReaderMode readerMode)
      Creates a new type pool resolver for a class file locator as a supplement of the implicit type pool.
      Parameters:
      classFileLocator - The class file locator to use.
      readerMode - The reader mode to apply.
  • Method Details

    • of

      Creates a new type pool resolver that supplements the supplied class loader to the implicit type pool.
      Parameters:
      classLoader - The class loader to use as a supplement which can be null to represent the bootstrap loader.
      Returns:
      An appropriate type pool resolver.
    • resolve

      public TypePool resolve(TypeDescription instrumentedType, MethodDescription instrumentedMethod, TypePool typePool)
      Resolves a type pool to use for locating substituted members.
      Specified by:
      resolve in interface MemberSubstitution.TypePoolResolver
      Parameters:
      instrumentedType - The instrumented type.
      instrumentedMethod - The instrumented method.
      typePool - The type pool implicit to the instrumentation.
      Returns:
      The type pool to use.