org.slim3.commons.web
Class HotdeployClassLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by org.slim3.commons.web.HotdeployClassLoader

public class HotdeployClassLoader
extends ClassLoader

The ClassLoader for HOT deployment.

Since:
3.0
Author:
higa

Constructor Summary
HotdeployClassLoader(ClassLoader parentClassLoader)
          Constructor
 
Method Summary
protected  Class<?> defineClass(String className, boolean resolve)
          Defines the class.
protected  Class<?> defineClass(String className, byte[] bytes)
          Defines the class.
protected  Class<?> defineClass(String className, InputStream is)
          Defines the class.
protected  byte[] getBytes(InputStream is)
          Returns input stream data as the array of bytes.
protected  InputStream getInputStream(String path)
          Returns the input stream
protected  boolean isTargetClass(String className)
          Determines if the class is target of HOT deployment.
 Class<?> loadClass(String className, boolean resolve)
           
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HotdeployClassLoader

public HotdeployClassLoader(ClassLoader parentClassLoader)
Constructor

Parameters:
parentClassLoader - the parent class loader.
Method Detail

loadClass

public Class<?> loadClass(String className,
                          boolean resolve)
                   throws ClassNotFoundException
Overrides:
loadClass in class ClassLoader
Throws:
ClassNotFoundException

isTargetClass

protected boolean isTargetClass(String className)
Determines if the class is target of HOT deployment.

Parameters:
className - the class name
Returns:
whether the class is target for of deployment

defineClass

protected Class<?> defineClass(String className,
                               boolean resolve)
Defines the class.

Parameters:
className - the class name
resolve - whether the class is resolved
Returns:
the class

defineClass

protected Class<?> defineClass(String className,
                               InputStream is)
Defines the class.

Parameters:
className - the class name
is - the input stream
Returns:
the class

defineClass

protected Class<?> defineClass(String className,
                               byte[] bytes)
Defines the class.

Parameters:
className - the class name
bytes - the array of bytes.
Returns:
the class

getInputStream

protected InputStream getInputStream(String path)
Returns the input stream

Parameters:
path - the path
Returns:
the input stream

getBytes

protected byte[] getBytes(InputStream is)
                   throws RuntimeException
Returns input stream data as the array of bytes.

Parameters:
is - the input stream
Returns:
the array of bytes
Throws:
RuntimeException - if IOException is encountered


Copyright © 2008-2009 The Slim3 project. All Rights Reserved.