org.springsource.loaded
Class SpringLoaded

java.lang.Object
  extended by org.springsource.loaded.SpringLoaded

public class SpringLoaded
extends java.lang.Object

API for directly interacting with SpringLoaded.

Since:
0.8.0

Constructor Summary
SpringLoaded()
           
 
Method Summary
static int loadNewVersionOfType(java.lang.Class<?> clazz, byte[] newbytes)
          Force a reload of an existing type.
static int loadNewVersionOfType(java.lang.ClassLoader classLoader, java.lang.String dottedClassname, byte[] newbytes)
          Force a reload of an existing type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringLoaded

public SpringLoaded()
Method Detail

loadNewVersionOfType

public static int loadNewVersionOfType(java.lang.Class<?> clazz,
                                       byte[] newbytes)
Force a reload of an existing type.

Parameters:
clazz - the class to be reloaded
newbytes - the data bytecode data to reload as the new version
Returns:
int return code: 0 is success. 1 is unknown classloader, 2 is unknown type (possibly not yet loaded). 3 is reload event failed. 4 is exception occurred.

loadNewVersionOfType

public static int loadNewVersionOfType(java.lang.ClassLoader classLoader,
                                       java.lang.String dottedClassname,
                                       byte[] newbytes)
Force a reload of an existing type.

Parameters:
classLoader - the classloader that was used to load the original form of the type
dottedClassname - the dotted name of the type being reloaded, e.g. com.foo.Bar
newbytes - the data bytecode data to reload as the new version
Returns:
int return code: 0 is success. 1 is unknown classloader, 2 is unknown type (possibly not yet loaded). 3 is reload event failed. 4 is exception occurred.