In the old deployment impl that was the purpose of the DeploymentInfo.localCl. However it had no integration with other deployment contexts. In the new vdf you should be able to scan for classes/resources using the vfs. This should be a common aspect that all deployers used to build up the deployment metadata from classes and xml descriptors.
Is there any reason we couldn't set up the appropriate classloaders before scanning for dependencies? I guess what i'm saying is that I don't want to use Javassist and a throwaway Resource classloader and that I'd rather use reflection and the real classloader that is going to be used by the application.
Eh, maybe I'm just being lazy, but I just spent a bunch of time refactoring the injection code and I don't want to do it again.
The scan of the deployment in the vdf happens during the analyze phase so that the result and associated management objects are available to the profileservice. There may not be a meaningful deployment class loader as the deployment processing can be run offline. Anything you are doing now under the current trunk branch is going to have to be ported to the virtual deployment framework based deployers.