Does this account for Delegate and Strategy ?
Can I say delegate and strategy both are used at the same time in the example below ?
I load a class through reflections and invoke a write method on that. Now this in turn may write in to a file or database depending on the class being loaded (className) and each class that can be used implements the interface MyInterface so I can simply call myInterfaceObject.write to write into the database, file or what so ever by loading a proper class.
Class myclass = Class.forName(className);
Constructor c = myclass.getConstructor(null);
MyInterface object = c.newInstance(null);
object.writeValue("Java");
TIA

