I defined the interface my system will depend on:
IMethodCall
and I created a group of classes that implement IMethodCall:
AbstractMethodCall
ConstructorCall
TargetConstructorCall
VoidMethodCall
TargetVoidMethodCall
NonVoidMethodCall
TargetNonVoidMethodCall
These are implementation details, and my system does not know about them (or at least does not need them).
There is some complicated logic for choosing which implementation to create an instance based on the data set that I will have on hand at that time, so I decided to create a factory to have all this logic grouped in one place
MethodCallFactory
, , . , methodCalls , . IMethodCall MethodCallFactory , . , , factory , , , , , , factory.
, , - , , , , ?