示例#1
0
 private void collect(IClassInfo ci, Set<Class> collector) {
   if (ci.hasAnnotation(IgnoreBean.class)) {
     if (LOG.isDebugEnabled()) {
       LOG.debug(
           "Skipping bean candidate '{}' because it is annotated with '{}'.",
           ci.name(),
           IgnoreBean.class.getSimpleName());
     }
     return;
   }
   if (!ci.isInstanciable()) {
     if (LOG.isDebugEnabled()) {
       LOG.debug("Skipping bean candidate '{}' because it is not instanciable.", ci.name());
     }
     return;
   }
   if (!ci.hasNoArgsConstructor()) {
     if (LOG.isDebugEnabled()) {
       LOG.debug("Skipping bean candidate '{}' because it has no empty constructor().", ci.name());
     }
     return;
   }
   try {
     collector.add(ci.resolveClass());
   } catch (Exception ex) {
     LOG.warn("Could not resolve class [{}]", ci.name(), ex);
   }
 }