I solved my problem but I did nasty hack.
First of all I've created CustomURLClassLoader using the original source of URLClassLoader. I was then able to inject process bytecode method before defining class. I had to extend RepositoryLoader to inherint not from URLClassLoader but from my custom one.
I know that it is more than 2 years since you posted this topic. I am stuck in the same thing, I have to write a custom class loader for jboss 5.1 to load encrypted classes.
Can you kindly give me some more information as to how you did it.