I have let's say "Merge-Classes" that I call when I need to merge specific data with a specific JasperReport (Template). For each of those reports I need its own class to merge the data. I fill this reports dynamicaly, depending on which my custom wants.
Is it possible that I give my programm the name of the class and the method to call by a variable String and call that class/method? So it would be easy to add new Merge-Classes to my program (only copy paste the file and call by given name)
For example: I have a main program and a class named Report.java with a same name class and the method Test() in my main i have something like:
String classname = "Report.Test";
String parameters = "(var1, var2, var3)";
String end = """call class with params stored in classname+parameters"""