There are some Interfaces and implementation classes.
Some classes would be having dependency on the interface implementation,
If it would have been spring Framework, It will find the interface implementation and assigns implementation class to it.
In the following Spring will find Ishape implementation and assigns it to IShape.
I need to declare like,
But, the above code is having actual implementation this.shape = new ShapeImpl(); class with-in the code. Is there a way to do without spring using plain java.
Something,like this.shape = createObject(IShape.class) . But,haven't got good Idea about implementation of createObject.