Description
Within the org.springframework.test.context.bean.override
package, OverrideMetadata
sticks out like a sore thumb: it's the only public type whose name does not start with BeanOverride
. Considering that alone, I'd suggest we rename it to BeanOverrideMetadata
.
However, an OverrideMetadata
component plays two roles: a factory for a bean override instance and a holder for metadata, and I would argue that "creation of the bean override instance" is the primary role of such a component. In addition, I find it a bit unusual that a "metadata" component "creates" something. Rather, it's usually the other way around: a component typically creates something from metadata. Along those lines, I consider an OverrideMetadata
component more like a factory which creates a bean override instance based on metadata that is has been supplied.
In light of the above, I suggest that we rename OverrideMetadata
to BeanOverrideFactory
.
Activity