dynclass
Class ClassCreator
java.lang.Object
|
+--dynclass.ClassCreator
- public class ClassCreator
- extends Object
ClassCreator turns a ClassDefinition into a real-live Class.
It also has utility methods for constructing instances of
classes it creates.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClassCreator
public ClassCreator()
newInstance
public static Object newInstance(Class cls,
InvocationHandler impl)
throws Exception
- Create a new instance of the given class, which must have been
created by ClassCreator. Method calls will be dispatched to
the given InvocationHandler.
defineClass
public static Class defineClass(ClassDefinition def)
- Create a Class from the given description. Recent definitions are
cached, so if an equivalent ClassDefinition was provided recently
then there is a good chance the same class will be returned.