docs: @SuppressFBWarnings(value = "RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED", justification = "Using non-standard semantics of putIfAbsent")
      public BeanIdentifier putIfAbsent(Contextual<?> contextual) {
          if (contextual instanceof CommonBean<?>) {
              // this is a Bean<?> created by Weld
              CommonBean<?> bean = (CommonBean<?>) contextual;
              passivationCapableContextuals.putIfAbsent(bean.getIdentifier(), contextual);
              return bean.getIdentifier();
          }
          if (contextual instanceof PassivationCapable) {
              // this is an extension-provided passivation capable bean
              PassivationCapable passivationCapable = (PassivationCapable) contextual;
              String id = passivationCapable.getId();
              BeanIdentifier identifier = new StringBeanIdentifier(id);
              passivationCapableContextuals.putIfAbsent(identifier, contextual);
              return identifier;
          } else {
              BeanIdentifier id = contextuals.get(contextual);
              if (id != null) {
                  return id;
              } else {
                  synchronized (contextual) {
                      id = contextuals.get(contextual);
                      if (id == null) {
                          id = new StringBeanIdentifier(new StringBuilder().append(GENERATED_ID_PREFIX).append(idGenerator.incrementAndGet()).toString());
                          contextuals.put(contextual, id);
                          contextualsInverse.put(id, contextual);
                      }
                      return id;
                  }
              }
          }
      }