code: private <T> T createInstance(final Class<T> implClass) {
          {
              // Get the constructor to use in making the new instance
              final Constructor<? extends T> ctor;
              try {
                  ctor = SecurityActions.getConstructor(implClass, new Class<?>[] {});
              } catch (final NoSuchMethodException nsme) {
                  throw new RuntimeException(implClass + " must contain a public no args contructor");
              }
  
              // Create a new instance using the backing model
              final T instance;
              try {
                  instance = ctor.newInstance();
              }
              // Handle all construction errors equally
              catch (final Exception e) {
                  throw new RuntimeException("Could not create new service instance", e);
              }
  
              // Return
              return implClass.cast(instance);
  
          }
      }
docs: Create a new instance of the found Service. <br/>
  
  Verifies that the found ServiceImpl implements Service.
  
  @param <T>
  @param serviceType The Service interface
  @param className The name of the implementation class
  @param loader The ClassLoader to load the ServiceImpl from
  @return A new instance of the ServiceImpl
  @throws Exception If problems creating a new instance