Class HotSwapper
- java.lang.Object
-
- org.hotswap.agent.plugin.hotswapper.HotSwapper
-
public class HotSwapper extends Object
Created by bubnik on 22.5.2014.
-
-
Constructor Summary
Constructors Constructor Description HotSwapper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ClassnewClass(String className, String directory, ClassLoader cl)static voidswapClasses(Class original, String swap)Swap class definition from another class file.
-
-
-
Method Detail
-
swapClasses
public static void swapClasses(Class original, String swap) throws Exception
Swap class definition from another class file. This is mainly useful for unit testing - declare multiple version of a class and then hotswap definition and do the tests.- Parameters:
original- original class currently in useswap- fully qualified class name of class to swap- Throws:
Exception- swap exception
-
newClass
public static Class newClass(String className, String directory, ClassLoader cl)
-
-