How to organize a set of specific classes that implement the interface in different packages?

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.

, , - , , , , ?

+3
2

, factory .

, - . , , . IDE , . , , , , .

, , factory . , .

+2

factory .

, . api .

:

- org.feeling.ui.dialogs

- org.feeling.internal.ui.dailogs

0

All Articles