code: @SuppressWarnings("unchecked")
      public static <T> IDomainFactory<T> getFactory(Class<T> clazz) {
          for (IDomainFactory<?> factory : instance) {
              String alias = factory.getAlias(clazz);
              
              if (alias != null) {
                  return (IDomainFactory<T>) factory;
              }
          }
          
          throw new IllegalArgumentException("Domain class has no registered factory: " + clazz.getName());
      }
docs: Returns a domain factory for the specified class.
  
  @param <T> Class of domain object.
  @param clazz Class of object created by factory.
  @return A domain object factory.