* The service annotations.
* @param scannedClass
* The scanned class
*/
private ServiceDescription createService(final List<ClassAnnotation> descs, final ScannedClass scannedClass) {
final ServiceDescription service = new ServiceDescription(descs.get(0));
final List<String> listedInterfaces = new ArrayList<String>();
for (final ClassAnnotation d : descs) {
if (d.getBooleanValue("serviceFactory", false)) {
service.setServiceFactory(true);
}
if (d.getValue("value") != null) {
final String[] interfaces = (String[]) d.getValue("value");
for (String t : interfaces) {
listedInterfaces.add(t);
}
}
}
if (listedInterfaces.size() > 0 && !listedInterfaces.contains(AutoDetect.class.getName())) {
for (final String i : listedInterfaces) {
service.addInterface(i);
}
} else {
// auto detection
addInterfaces(service, scannedClass.getScannedClass());
}