@NonNullByDefault @ThreadSafe public final class JavassistUtils extends Object
Modifier and Type | Method and Description |
---|---|
void |
appendClassLoaderIfMissing(ClassLoader loader) |
javassist.CtClass |
asCtClass(Class<?> cls) |
static JavassistUtils |
forClassPool(javassist.ClassPool pool)
Get a utility instance for a particular class pool.
|
javassist.CtClass |
instantiatePrototype(String prototype,
String fqn,
ClassCustomizer customizer)
Instantiate a new class based on a prototype.
|
public static JavassistUtils forClassPool(javassist.ClassPool pool)
pool
- Backing class pool@Beta public javassist.CtClass instantiatePrototype(String prototype, String fqn, ClassCustomizer customizer) throws javassist.CannotCompileException, javassist.NotFoundException
customizer
is guaranteed to run with this object locked.prototype
- Prototype class fully qualified namefqn
- Target class fully qualified namecustomizer
- Customization callback to be invoked on the new classjavassist.NotFoundException
- when the prototype class is not foundjavassist.CannotCompileException
public javassist.CtClass asCtClass(Class<?> cls)
public void appendClassLoaderIfMissing(ClassLoader loader)
Copyright © 2019 OpenDaylight. All rights reserved.