I'm writing a small game of life implementation with Spring, but trying to avoid referencing the Spring context within my code. I have two interfaces, Board and Cell. In each implementation of Board it will create a 2d array of Cells at some point. The problem is that since I'm trying not to reference Spring in my code, I can't use the Spring context to get an instance of the Cell.
I was thinking that it would be a good idea to create a CellFactory to create Cells, and then in the implementation give it the Cell class that I want to use.
So my question is, is this a bad design? If so what would be a better way of achieving this?