code: public static <T> T instantiateUserCode(TaskConfig config, ClassLoader cl, Class<? super T> superClass) {
  		try {
  			T stub = config.<T>getStubWrapper(cl).getUserCodeObject(superClass, cl);
  			// check if the class is a subclass, if the check is required
  			if (superClass != null && !superClass.isAssignableFrom(stub.getClass())) {
  				throw new RuntimeException("The class '" + stub.getClass().getName() + "' is not a subclass of '" + 
  						superClass.getName() + "' as is required.");
  			}
  			return stub;
  		}
  		catch (ClassCastException ccex) {
  			throw new RuntimeException("The UDF class is not a proper subclass of " + superClass.getName(), ccex);
  		}
  	}
docs: Instantiates a user code class from is definition in the task configuration.
  The class is instantiated without arguments using the null-ary constructor. Instantiation
  will fail if this constructor does not exist or is not public.
  
  @param <T> The generic type of the user code class.
  @param config The task configuration containing the class description.
  @param cl The class loader to be used to load the class.
  @param superClass The super class that the user code class extends or implements, for type checking.
  
  @return An instance of the user code class.