interfaces.remove(interfce);
}
}
List<Class> locals = new ArrayList<Class>();
Local local = clazz.getAnnotation(Local.class);
if (local != null) {
if (local.value().length == 0) {
if (interfaces.size() != 1) {
validation.fail(ejbName, "ann.local.noAttributes", join(", ", interfaces));
} else if (clazz.getAnnotation(Remote.class) != null) {
validation.fail(ejbName, "ann.localRemote.ambiguous", join(", ", interfaces));
} else if (interfaces.get(0).getAnnotation(Remote.class) != null) {
validation.fail(ejbName, "ann.localRemote.conflict", join(", ", interfaces));
} else {
if (validateLocalInterface(interfaces.get(0), validation, ejbName)){
locals.add(interfaces.get(0));
}
interfaces.remove(0);
}
} else for (Class interfce : local.value()) {
if (validateLocalInterface(interfce, validation, ejbName)){
locals.add(interfce);
}
interfaces.remove(interfce);
}