I can't understand most of that code, I am afraid.
If you want to instantiate different types depending on circumstances, consider
1: Giving those types a common maybe abstract supertype.2: Don't try to distinguish methods by their parameter types like that.3: Give the supertype static factory methods which can instantiate subtypes if required. It might be neater to have the subtypes as private nested classes.4: Consider passing some parameter whose value (not type) hints at the subtype required, e.g. a String or an enum element.I do not believe you can pass such arrays to a
switch statement because the cases have to be of type
enum XYZ or
int or String.