code: private void loadIfNecessary() {
  
          if (loadedMember != null) {
              return;
          }
  
          CommandRegistry commandRegistry = parentGroup.getCommandRegistry();
  
          Assert.isTrue(parentGroup.getCommandRegistry() != null, "Command registry must be set for group '"
                  + parentGroup.getId() + "' in order to load lazy command '" + lazyCommandId + "'.");
  
          if (commandRegistry.containsCommandGroup(lazyCommandId)) {
              CommandGroup group = commandRegistry.getCommandGroup(lazyCommandId);
              loadedMember = new SimpleGroupMember(parentGroup, group);
          }
          else if (commandRegistry.containsActionCommand(lazyCommandId)) {
              ActionCommand command = commandRegistry.getActionCommand(lazyCommandId);
              loadedMember = new SimpleGroupMember(parentGroup, command);
          }
          else {
  
              if (logger.isWarnEnabled()) {
                  logger.warn("Lazy command '"
                              + lazyCommandId
                              + "' was asked to display; however, no backing command instance exists in registry.");
              }
  
          }
  
          if (addedLazily && loadedMember != null) {
              loadedMember.onAdded();
          }
  
      }
docs: Attempts to load the lazy command from the command registry of the parent command group, but
  only if it hasn't already been loaded.