spring-framework / org.springframework.aop.interceptor / ExposeBeanNameAdvisors / getBeanName

getBeanName

open static fun getBeanName(): String

Find the bean name for the current invocation. Assumes that an ExposeBeanNameAdvisor has been included in the interceptor chain, and that the invocation is exposed with ExposeInvocationInterceptor.

Exceptions

IllegalStateException - if the bean name has not been exposed

Return
the bean name (never null)

open static fun getBeanName(mi: MethodInvocation): String

Find the bean name for the given invocation. Assumes that an ExposeBeanNameAdvisor has been included in the interceptor chain.

Parameters

mi - MethodInvocation that should contain the bean name as an attribute

Exceptions

IllegalStateException - if the bean name has not been exposed

Return
the bean name (never null)