description Replace Constructor with Factory Method Overview
This refactoring replaces a public constructor with a static factory method. It is useful for creating more descriptive instantiation logic or enforcing specific object creation rules without exposing the internal constructor directly.
help Replace Constructor with Factory Method FAQ
How good is Replace Constructor with Factory Method?
How does Replace Constructor with Factory Method compare to Replace Conditional with Polymorphism?
explore Explore More
Similar to Replace Constructor with Factory Method
See all arrow_forwardReviews & Comments
Write a Review
Be the first to review
Share your thoughts with the community and help others make better decisions.