remoteTester.runner.server
Class ByteClassLoader

java.lang.Object
  extended byjava.lang.ClassLoader
      extended byremoteTester.runner.server.ByteClassLoader

public class ByteClassLoader
extends java.lang.ClassLoader

This class loader instanciate classes provided as a byte array


Constructor Summary
ByteClassLoader(byte[] classAsByte, java.lang.String className)
          This class loader allows to load the Class provided as a byte array in the current JVM
ByteClassLoader(byte[] classAsByte, java.lang.String className, byte[][] helperClassesAsBytes, java.lang.String[] helperClasseNames)
          This class loader allows to load the Class provided as a byte array in the current JVM
 
Method Summary
 java.lang.Class loadClass()
          this should be the prefered method to load the class that was defined in the constructor
protected  java.lang.Class loadClass(java.lang.String className, boolean resolve)
          overrride the default class loader mechanism
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, 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

ByteClassLoader

public ByteClassLoader(byte[] classAsByte,
                       java.lang.String className)
This class loader allows to load the Class provided as a byte array in the current JVM

Parameters:
classAsByte -
className -

ByteClassLoader

public ByteClassLoader(byte[] classAsByte,
                       java.lang.String className,
                       byte[][] helperClassesAsBytes,
                       java.lang.String[] helperClasseNames)
This class loader allows to load the Class provided as a byte array in the current JVM

Parameters:
classAsByte - an array of byte that allows to create a class
className - the class name
helperClassesAsBytes - helper classes definition as byte arrays
helperClasseNames - helper classes names
Method Detail

loadClass

public java.lang.Class loadClass()
                          throws java.lang.ClassNotFoundException
this should be the prefered method to load the class that was defined in the constructor

Returns:
the Class loaded
Throws:
java.lang.ClassNotFoundException

loadClass

protected java.lang.Class loadClass(java.lang.String className,
                                    boolean resolve)
                             throws java.lang.ClassNotFoundException
overrride the default class loader mechanism

Parameters:
className - class to load
resolve - need to resolve
Returns:
The Class loaded
Throws:
java.lang.ClassNotFoundException


Copyright © 2003-2004 Nicolas FRANK. All Rights Reserved.