I have those classes like this:
object Class1 extends parent {
   def execute() {
        print("Class1")
   }
}
object Class2 extends parent {
   def execute {
        print("Class2")
   }
}
Then I have a Runner like this:
object Runner extends runParent {
    def manageRun(className: String) = {
        def ClassInstance = className match {
             case Some("Class1") => Some(Class1)
             case Some("Class2") => Some(Class2)
        }
       ClassInstance.execute()
    }
}
There is any way to change this managerRun code and when I create a Class3 I don't need to add a new case in the match?
Thanks!
 
    