When I wish to export multiple services
@ServiceExport(interfaces = {SystemReadyState.class, ManagedService.class})
public class MyClass implements SystemReadyState, ManagedService {}
The generated code is incorrect and only contains one interface
@Named
@EagerSingleton
public class SystemReadyStatePeaberryServiceExport {
@Inject
Export<SystemReadyState> service;
}
@Named
public class SystemReadyStatePeaberryExportModule extends AbstractModule {
@Override
protected void configure() {
install(Peaberry.osgiModule());
Map<String, Object> attributes = new HashMap<>();
attributes.put("service.pid", SystemReadyVetoRegistry.class.getName());
bind(export(SystemReadyState.class)).toProvider(service(SystemReadyVetoRegistry.class)
.attributes(attributes)
.export());
}
}
Attempts to fix this have failed so far because the implementation relies on an exception being throw and thus we can never proceed past the first annotation to be processed. https://github.com/elasticpath/peaberry-code-generator/blob/master/src/main/java/org/eclipse/sisu/contrib/peaberry/ServiceExportAnnotationProcessor.java L80
When I wish to export multiple services
The generated code is incorrect and only contains one interface
Attempts to fix this have failed so far because the implementation relies on an exception being throw and thus we can never proceed past the first annotation to be processed. https://github.com/elasticpath/peaberry-code-generator/blob/master/src/main/java/org/eclipse/sisu/contrib/peaberry/ServiceExportAnnotationProcessor.java L80