code: @SuppressWarnings("unchecked")
      public static synchronized <F> F getInstance(final Class<?> objectType,
                                                   final Class<F> factory)
      {
          Cache<Class<?>, Object> innerCache = cCache.get(factory);
          if (innerCache == null) {
              innerCache = new SoftValueCache(5);
              cCache.put(factory, innerCache);
          }
          F instance = (F) innerCache.get(objectType);
          if (instance != null) {
              return instance;
          }
  
          if (objectType == null) {
              throw new IllegalArgumentException("No object type");
          }
          if (factory == null) {
              throw new IllegalArgumentException("No factory type");
          }
          if (!factory.isInterface()) {
              throw new IllegalArgumentException("Factory must be an interface");
          }
  
          final Cache<Class<?>, Object> fInnerCache = innerCache;
          return AccessController.doPrivileged(new PrivilegedAction<F>() {
              public F run() {
                  return getInstance(fInnerCache, objectType, factory);
              }
          });
      }
docs: Returns a factory instance for one type of object. Each method in the
  interface defines a constructor via its parameters. Any checked
  exceptions declared thrown by the constructor must also be declared by
  the method. The method return types can be the same type as the
  constructed object or a supertype.
  
  <p>Here is a contrived example for constructing strings. In practice,
  such a string factory is useless, since the "new" operator can be
  invoked directly.
  
  <pre>
  public interface StringFactory {
  String newEmptyString();
  
  String newStringFromChars(char[] chars);
  
  String newStringFromBytes(byte[] bytes, String charsetName)
  throws UnsupportedEncodingException;
  }
  </pre>
  
  Here's an example of it being used:
  
  <pre>
  StringFactory sf = QuickConstructorGenerator.getInstance(String.class, StringFactory.class);
  ...
  String str = sf.newStringFromChars(new char[] {'h', 'e', 'l', 'l', 'o'});
  </pre>
  
  @param objectType type of object to construct
  @param factory interface defining which objects can be constructed
  @throws IllegalArgumentException if factory type is not an interface or
  if it is malformed