code: @SuppressWarnings("unchecked")
      private Constructor<BDBRepository> getRepositoryConstructor()
          throws ClassCastException, ClassNotFoundException, NoSuchMethodException
      {
          String packageName;
          {
              String thisClassName = getClass().getName();
              packageName = thisClassName.substring(0, thisClassName.lastIndexOf('.'));
          }
          String className = packageName + '.' + getBDBProduct().name() + "_Repository";
          Class repoClass = Class.forName(className);
          if (BDBRepository.class.isAssignableFrom(repoClass)) {
              return repoClass.getDeclaredConstructor
                  (AtomicReference.class, BDBRepositoryBuilder.class);
          }
          throw new ClassCastException("Not an instance of BDBRepository: " + repoClass.getName());
      }
docs: Looks up appropriate repository via reflection, whose name is derived
  from the BDB product string.