codesimian.wrap
Class SelfWrapperCreator
java.lang.Object
codesimian.wrap.SelfWrapperCreator
public class SelfWrapperCreator
- extends java.lang.Object
For example, creates a class that wraps a Component,
and the new class is a subclass of Component.
The subclass contains a variable of type Component called "wrapped",
and for every function of Component, it returns wrapped.thatFunction(params...).
So in every way except class type, the wrapper instance is equal to any Component it wraps.
For example, this could be used to create a CSWrapsCS class,
which is not useful by itself, but could, for example, be used to create a
class that always pretends to be the wrapped object's first parameter.
Method Summary |
static java.lang.String |
javaCodeForSubclassOf(java.lang.Class superclass,
java.lang.String newClassName)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SelfWrapperCreator
public SelfWrapperCreator()
javaCodeForSubclassOf
public static java.lang.String javaCodeForSubclassOf(java.lang.Class superclass,
java.lang.String newClassName)