spring-framework / org.springframework.beans.factory.support / SimpleInstantiationStrategy / getCurrentlyInvokedFactoryMethod

getCurrentlyInvokedFactoryMethod

@Nullable open static fun getCurrentlyInvokedFactoryMethod(): Method

Return the factory method currently being invoked or null if none.

Allows factory method implementations to determine whether the current caller is the container itself as opposed to user code.