private void processServiceMethod(final Method loadMethod, final BootstrapContext context,
final ErraiServiceConfiguratorImpl config) {
Object svc = null;
Service svcAnnotation = loadMethod.getAnnotation(Service.class);
if (null == svcAnnotation) {
// Diagnose Errai-111
StringBuilder sb = new StringBuilder();
sb.append("Service annotation cannot be loaded. (See https://jira.jboss.org/browse/ERRAI-111)\n");
sb.append(loadMethod.getName()).append(" class: ").append(loadMethod.getClass().getSimpleName());
sb.append(" loader: ").append(loadMethod.getClass().getClassLoader()).append("\n");
sb.append("@Service loader:").append(Service.class.getClassLoader()).append("\n");
log.warn(sb.toString());
return;
}
boolean local = loadMethod.isAnnotationPresent(Local.class);
String svcName = svcAnnotation.value();
// If no name is specified, just use the class name as the service by default.
if ("".equals(svcName)) {
svcName = loadMethod.getName();
}