This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Description
I have a question about this map, which uses the handler class names as keys and the Type for each class as the value.
It appears that the purpose of this map is so that when the class associated with an async request is retrieved (as a string of class name), AsyncRequestQueueable can retrieve the associated Type to call newInstance().
My question is why not just take the string of the class name from the async request and call Type.forName(<class name string>) to get the Type, on which you can then call newInstance()?
This would appear to eliminate the need to maintain the requestHandlers map, and eliminate the need for the getRequestType() method in each handler that just returns the class name. You would no longer need to update AsyncRequestQueueable every time you define a new handler class. You could still do exception handling if there is no handler class - you would just end up with null for the Type.
Any thoughts on whether this approach would cause any problems?
Thanks!!
Scott