MethodSignature sig = new MethodSignature(interfaceType, DELEGATE_METHOD, null, null);
classFab.addMethod(Modifier.PRIVATE, sig, String.format("return ($r) %s.createObject();", CREATOR_FIELD));
MethodIterator mi = new MethodIterator(interfaceType);
while (mi.hasNext())
{
sig = mi.next();
classFab.addMethod(Modifier.PUBLIC, sig,
String.format("return ($r) %s().%s($$);", DELEGATE_METHOD, sig.getName()));
}
if (!mi.getToString())
classFab.addMethod(Modifier.PUBLIC, toStringSignature, String.format("return %s;", DESCRIPTION_FIELD));
return classFab.createClass();
}