Currently i have a custom classloader which extends java.net.URLClassLoader#URLClassLoader, and i want to enable my custom classloader as parallel capable. To do this i need to call a static method from my custom classloader java.lang.ClassLoader#registerAsParallelCapable
In java custom classloader this would be as straightforward as having registration done in a static block, but currently i see that for scala i need to do this is a companion object and not in my custom class, but i doubt that will take affect as
- Internally this registration will register only Reflection.getCallerClass().
- Will companion object also have to extend URLClassLoader.? (no default constructor in URLClassLoader and cannot pass null as it will throw exception)
Any pointers.?