Assuming you have a string containing the name of a method, an object that supports that method and some arguments, is there some language feature that allows you to call th
scala> val commandExecutor = Map("cleanup" -> {()=> println("cleanup successfully")} ) commandExecutor: scala.collection.immutable.Map[String,() => Unit] = Map(cleanup -> ) scala> val command="cleanup" command: String = cleanup scala> commandExecutor(command).apply cleanup successfully