sf.qof.util
Class DefineClassHelper
java.lang.Object
sf.qof.util.DefineClassHelper
public class DefineClassHelper
- extends Object
Helper class to call the defineClass method of the ClassLoader.
- See Also:
ClassLoader
Method Summary |
static
|
defineClass(String className,
byte[] byteCode,
ClassLoader loader)
Calls ClassLoader.defineClass and returns a Class
instance if successful. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefineClassHelper
public DefineClassHelper()
defineClass
public static <T> Class<T> defineClass(String className,
byte[] byteCode,
ClassLoader loader)
throws Exception
- Calls
ClassLoader.defineClass
and returns a Class
instance if successful.
- Type Parameters:
T
- type of the class- Parameters:
className
- class namebyteCode
- array containing the byte code of the classloader
- class loader
- Returns:
- newly defined class
- Throws:
Exception
- error occurred- See Also:
ClassLoader
Copyright © 2007 brunella ltd. All Rights Reserved.