cf.addMethod(Modifier.PRIVATE, new MethodSignature(serviceInterface, "_getStrategy",
new Class[]
{ Object.class }, null), "return (" + serviceInterface.getName()
+ ") _registry.getStrategy($1.getClass());");
MethodIterator i = new MethodIterator(serviceInterface);
while (i.hasNext())
{
MethodSignature sig = i.next();
if (proper(sig))
{
addAdaptedMethod(cf, sig);
}
else
{
ClassFabUtils.addNoOpMethod(cf, sig);
factoryParameters.getErrorLog().error(
StrategyMessages.improperServiceMethod(sig),
HiveMind.getLocation(factoryParameters.getFirstParameter()),
null);
}
}
if (!i.getToString())
ClassFabUtils.addToStringMethod(cf, StrategyMessages.toString(factoryParameters
.getServiceId(), serviceInterface));
return cf.createClass();
}