// Define inline implementation constructor
ImplementationConstructor constructor = new AbstractServiceImplementationConstructor(md.getLocation())
{
public Object constructCoreServiceImplementation(ImplementationConstructionContext context)
{
InterfaceSynthesizerImpl result = new InterfaceSynthesizerImpl();
// Manual wiring of the class factory
result.setClassFactory((ClassFactory) context.getService(ClassFactory.class));
return result;
}
};
helper.addServiceImplementation(spd, constructor, ServiceModel.SINGLETON);