i have 8 handler class, is there a way i can create the chain dynamically in java?
What I mean, if I have two classes right now like:
HandlerA
HandlerB
HandlerChain
HanddlerChain will create the chain, HandlerA->HandlerB, (using loop read all class names from the folder)
when i add HandlerC then it is automatically add without any interaction and the chain become, HandlerA->HandlerB->HandlerC.
--------------------------------------------------------
So if I had String className = "HandlerA"
What is the way i make instance of HandlerA.class using the privaice String?