codesimian.wrap
Class SelfWrapperCreator

java.lang.Object
  extended by 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.


Constructor Summary
SelfWrapperCreator()
           
 
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
 

Constructor Detail

SelfWrapperCreator

public SelfWrapperCreator()
Method Detail

javaCodeForSubclassOf

public static java.lang.String javaCodeForSubclassOf(java.lang.Class superclass,
                                                     java.lang.String newClassName)