org.codehaus.aspectwerkz.hook
Class ClassLoaderPatcher

java.lang.Object
  extended by org.codehaus.aspectwerkz.hook.ClassLoaderPatcher

public class ClassLoaderPatcher
extends Object

Utility methods to manipulate class redefinition of java.lang.ClassLoader in xxxStarter

Author:
Alexandre Vasseur

Constructor Summary
ClassLoaderPatcher()
           
 
Method Summary
static VirtualMachine hotswapClassLoader(String preProcessorName, String transport, String address)
          Patch java.lang.ClassLoader with preProcessorName instance and hotswap in target VM using a JDWP attaching connector Don't wait before connecting
static VirtualMachine hotswapClassLoader(String preProcessorName, String transport, String address, int secondsToWait)
          Patch java.lang.ClassLoader with preProcessorName instance and hotswap in target VM using a JDWP attaching connector
static byte[] inputStreamToByteArray(InputStream is)
          Converts an input stream to a byte[]
static void patchClassLoader(String preProcessorName, String dir)
          Patch java.lang.ClassLoader with preProcessorName instance and dump class bytecode in dir
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassLoaderPatcher

public ClassLoaderPatcher()
Method Detail

inputStreamToByteArray

public static byte[] inputStreamToByteArray(InputStream is)
                                     throws IOException
Converts an input stream to a byte[]

Throws:
IOException

patchClassLoader

public static void patchClassLoader(String preProcessorName,
                                    String dir)
Patch java.lang.ClassLoader with preProcessorName instance and dump class bytecode in dir


hotswapClassLoader

public static VirtualMachine hotswapClassLoader(String preProcessorName,
                                                String transport,
                                                String address)
Patch java.lang.ClassLoader with preProcessorName instance and hotswap in target VM using a JDWP attaching connector Don't wait before connecting


hotswapClassLoader

public static VirtualMachine hotswapClassLoader(String preProcessorName,
                                                String transport,
                                                String address,
                                                int secondsToWait)
Patch java.lang.ClassLoader with preProcessorName instance and hotswap in target VM using a JDWP attaching connector



Copyright © 2002-2005 Jonas Bonér, Alexandre Vasseur. All Rights Reserved.