While perusing the Spring docs, I find the BeanNameAware
interface. I've seen it before...in passing. But now I'm wondering: What practical use is there for this interface?
To avoid confusion, I'm not talking about BeanFactoryAware
or ApplicationContextAware
. These two interfaces make much more sense to me. It's the practical uses of BeanNameAware
that eludes me.
I've looked at how Spring uses it internally with things such as the timing stuff. And that makes sense to me. But what else? I'm at a loss for any reason that any of my own beans would ever need to know their own name as registered in the beans XML file.