code: public static Object createInstance(Class<?> type)
      {
          Object instance=null;
          try
          {
              //create instance
              instance=type.newInstance();
          }
          catch(Exception exception)
          {
              throw new FaxException("Unable to create new instance of type: "+type,exception);
          }
          
          return instance;
      }
docs: This function creates a new instance of the requested type.
  
  @param   type
  The class type
  @return  The instance