docs: @SuppressWarnings("unchecked")
      public <EngineComponent> EngineComponent[] getEngineComponents(Class<EngineComponent> clazz) {
          String thisMethodName = "getEngineComponents";
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
              SibTr.entry(tc, thisMethodName, clazz);
          }
  
          List<EngineComponent> foundComponents = new ArrayList<EngineComponent>();
  
          // No need to synchronize on jmeComponents to prevent concurrent
          // modification from dynamic config and runtime callbacks, because
          // jmeComponents is now a CopyOnWriteArrayList.
          Iterator<ComponentList> vIter = jmeComponents.iterator();
  
          while (vIter.hasNext()) {
              JsEngineComponent ec = vIter.next().getRef();
              if (clazz.isInstance(ec)) {
                  foundComponents.add((EngineComponent) ec);
              }
          }
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
              SibTr.exit(tc, thisMethodName, foundComponents);
          }
  
          // this code is required to get an array of the EngineComponent type.
          return foundComponents.toArray((EngineComponent[]) Array.newInstance(clazz, 0));
      }