code: @Deprecated
    public static boolean is(Set<String> runModes, String... expectedRunModes) {
      if (runModes != null && expectedRunModes != null) {
        for (String expectedRunMode : expectedRunModes) {
          if (runModes.contains(expectedRunMode)) {
            return true;
          }
        }
      }
      return false;
    }
docs: Checks if given run mode is active.
  @param runModes Run modes for current instance
  @param expectedRunModes Run mode(s) to check for
  @return true if any of the given run modes is active
  @deprecated Instead of directly using the run modes, it is better to make the component in question require a
  configuration (see OSGI Declarative Services Spec: configuration policy). In this case, a component
  gets only active if a configuration is available. Such a configuration can be put into the repository
  for the specific run mode.