List<Class<?>> classesWithEJBs = classFinder.findAnnotatedClasses(EJBs.class);
// Class-level annotation(s)
List<EJB> ejbList = new ArrayList<EJB>();
for (Class cls : classesWithEJBs) {
EJBs ejbs = (EJBs) cls.getAnnotation(EJBs.class);
if (ejbs != null) {
ejbList.addAll(Arrays.asList(ejbs.value()));
}
for (EJB ejb : ejbList) {
addEJB(annotatedApp, ejb, cls, null, null);
}
ejbList.clear();