java: Instantiate class from string

I was looking for a method to execute classes’ functions in a loop.
Classes are defined in xml file as following:

So, I had to do the following:
1. create Interface RunClasses

2. create extended classes ClassA and ClassB as following:

3. execute our classes in loop

This process will execute all your classes by name in a loop.