Beispiel #1
0
 public static String forBuiltInBean(BeanManagerImpl manager, Class<?> type, String suffix) {
   StringBuilder builder =
       getPrefix(AbstractSyntheticBean.class)
           .append(manager.getId())
           .append(BEAN_ID_SEPARATOR)
           .append(type.getSimpleName());
   if (suffix != null) {
     builder.append(BEAN_ID_SEPARATOR).append(suffix);
   }
   return builder.toString();
 }
Beispiel #2
0
 /**
  * @param bda
  * @param bean
  * @return true if the bda is null or the id of the BDA for the given bean equals to the value
  */
 boolean testBda(String bda, Bean<?> bean) {
   if (bda == null) {
     return true;
   }
   if (bean == null) {
     return false;
   }
   BeanManagerImpl beanManagerImpl = probe.getBeanManager(bean);
   if (beanManagerImpl == null) {
     return false;
   }
   if (FILTER_ADDITIONAL_BDAS_MARKER.equals(bda)) {
     if (beanManagerImpl.getId().endsWith(ADDITIONAL_BDA_SUFFIX)) {
       return false;
     }
   } else {
     if (!Components.getId(beanManagerImpl.getId()).equals(bda)) {
       return false;
     }
   }
   return true;
 }