code: @Override
      public <T> T addBean(Class<T> type) {
          Bean    beanAnnotation = type.getAnnotation(Bean.class);
          boolean isSingleton    = null == beanAnnotation || beanAnnotation.singleton();
          if (isSingleton) {
              Object bean = put(type, true);
              return type.cast(bean);
          }
          return null;
      }
docs: Register @Bean marked objects