code: private static BeanIdentifier getIdentifier(Contextual<?> contextual, ContextualStore contextualStore, ServiceRegistry serviceRegistry) {
          if (contextual instanceof RIBean<?>) {
              return ((RIBean<?>) contextual).getIdentifier();
          }
          if (contextualStore == null) {
              contextualStore = serviceRegistry.get(ContextualStore.class);
          }
          return contextualStore.putIfAbsent(contextual);
      }
docs: A slightly optimized way to get the bean identifier - there is not need to call ContextualStore.putIfAbsent() for passivation capable beans because it's
  already called during bootstrap. See also {@link BeanManagerImpl#addBean(Bean)}.
  
  @param contextual
  @param contextualStore
  @param serviceRegistry
  @return the identifier for the given contextual