Rename OverrideMetadata
for Bean Overrides
#33702
Labels
Milestone
OverrideMetadata
for Bean Overrides
#33702
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 withBeanOverride
. Considering that alone, I'd suggest we rename it toBeanOverrideMetadata
.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 anOverrideMetadata
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
toBeanOverrideFactory
.The text was updated successfully, but these errors were encountered: