code: public static DataPublisher getInstance(Class<? extends DataPublisher> dataPublisherClass, State state)
        throws ReflectiveOperationException {
      Constructor<? extends DataPublisher> dataPublisherConstructor = dataPublisherClass.getConstructor(State.class);
      return dataPublisherConstructor.newInstance(state);
    }
docs: Get an instance of {@link DataPublisher}.
  
  @param dataPublisherClass A concrete class that extends {@link DataPublisher}.
  @param state A {@link State} used to instantiate the {@link DataPublisher}.
  @return A {@link DataPublisher} instance.