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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface MemberSubstitution.TypePoolResolver
MemberSubstitution.TypePoolResolver.ForClassFileLocator, MemberSubstitution.TypePoolResolver.ForExplicitPool, MemberSubstitution.TypePoolResolver.OfImplicitPool -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ClassFileLocatorThe class file locator to use.private final TypePool.Default.ReaderModeThe reader mode to apply. -
Constructor Summary
ConstructorsConstructorDescriptionForClassFileLocator(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
Modifier and TypeMethodDescriptionof(ClassLoader classLoader) Creates a new type pool resolver that supplements the supplied class loader to the implicit type pool.resolve(TypeDescription instrumentedType, MethodDescription instrumentedMethod, TypePool typePool) Resolves a type pool to use for locating substituted members.
-
Field Details
-
classFileLocator
The class file locator to use. -
readerMode
The reader mode to apply.
-
-
Constructor Details
-
ForClassFileLocator
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 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.
-