Package net.bytebuddy.asm
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 java.lang.Object implements MemberSubstitution.TypePoolResolver
A type pool resolver that resolves the implicit pool but additionally checks another class file locator.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.asm.MemberSubstitution.TypePoolResolver
MemberSubstitution.TypePoolResolver.ForClassFileLocator, MemberSubstitution.TypePoolResolver.ForExplicitPool, MemberSubstitution.TypePoolResolver.OfImplicitPool
-
-
Field Summary
Fields Modifier and Type Field Description private ClassFileLocatorclassFileLocatorThe class file locator to use.private TypePool.Default.ReaderModereaderModeThe reader mode to apply.
-
Constructor Summary
Constructors Constructor Description ForClassFileLocator(ClassFileLocator classFileLocator)Creates a new type pool resolver for a class file locator as a supplement of the implicit type pool.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.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MemberSubstitution.TypePoolResolverof(java.lang.ClassLoader classLoader)Creates a new type pool resolver that supplements the supplied class loader to the implicit type pool.TypePoolresolve(TypeDescription instrumentedType, MethodDescription instrumentedMethod, TypePool typePool)Resolves a type pool to use for locating substituted members.
-
-
-
Field Detail
-
classFileLocator
private final ClassFileLocator classFileLocator
The class file locator to use.
-
readerMode
private final TypePool.Default.ReaderMode readerMode
The reader mode to apply.
-
-
Constructor Detail
-
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 Detail
-
of
public static MemberSubstitution.TypePoolResolver of(@MaybeNull java.lang.ClassLoader classLoader)
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 benullto 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:
resolvein interfaceMemberSubstitution.TypePoolResolver- Parameters:
instrumentedType- The instrumented type.instrumentedMethod- The instrumented method.typePool- The type pool implicit to the instrumentation.- Returns:
- The type pool to use.
-
-