public final class Enhancer extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
SUFFIX_ENHANCED
The enhanced suffix for the class
|
| Constructor and Description |
|---|
Enhancer() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
create(Class<?> clazz)
Returns the enhanced class bytecode.
|
static <T> Class<T> |
enhance(EntityType<T> type)
Enhances a type.
|
static <T> Class<T> |
loadClass(ClassLoader classLoader,
byte[] byteCode,
String className)
Loads the class.
|
public static final String SUFFIX_ENHANCED
public static byte[] create(Class<?> clazz) throws Exception
clazz - the class to enhanceException - thrown in case of an errorpublic static <T> Class<T> enhance(EntityType<T> type) throws Exception
T - the type of the entitytype - the type for the classException - thrown if the enhancement failspublic static <T> Class<T> loadClass(ClassLoader classLoader, byte[] byteCode, String className) throws Exception
T - the type of the classclassLoader - the class loaderbyteCode - the bytecodeclassName - the name of the classException - if class cannot be loadedCopyright © 2012 Batoo Software & Consultancy. All Rights Reserved.