Class MemberSubstitution.TypePoolResolver.ForClassFileLocator

    • 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​(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 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.