Hi AttonRand,
there are many ways to establish hooking in java. It depends on following questions:
What do you want your hook to do ?
Which language do you want to use ?
Do you want to hide your hook ?
First you can use reflection framework from java. You can code your own classloader and write a small wrapper which gets access when a class is going to be loaded. Then you can do some instrumentation with one of the known instrumentation frameworks (asm, bcel, etc...).
Another way would be to use the JVMTI interface to directly set hooks at native site. As far as i known there are special handlers which can be registered to get access before a class file is loaded or maybe also before a method is executed. Its not easy to JVMTI if you are not an expert in JNI programming, but a try worth.
Also you could reach your goal if do static instrumentation. Therefore you need to write a framework which is capable of transforming code depending on your needs, thus capable inserting calls directly in the bytecode. I wrote such a framework for the company I'm working in and I can tell you its not difficult but you will have to spend a lot of time to cover all cases which might be appear in a method.
If i were you, I would try learn how java reflection is working. Maybe in your case it provides what you need to do.
Regards,
OHPen.