<T> Object createArbitraryFor(Class<T> arbitraryT) throws TestException {
        if (arbitraryT.isEnum()) {
            T[] enumCs = arbitraryT.getEnumConstants();
            return enumCs[choose(0, enumCs.length - 1)];
        } else if (arbitraryT.isArray() 
        		&& arbitraryT.getComponentType().isPrimitive()) {
            throw new TestException("Generation of primitive arrays is unsupported."
            		+ " Use an array of primitive wrapper objects instead.");
        } else if (arbitraryT.isArray() /* && comp not prim */) {
        	return arbArray(arbitraryT.getComponentType());
        } else if (arbitraryT.isPrimitive()) {
            return createPrimitiveFor(arbitraryT);
        } else if (arbitraryT == String.class) {
            return arbString();
        }
        
        /* otherwise we want an arbitrary arbitraryT */
        try {
            Method maker = arbitraryT.getDeclaredMethod("arbitrary", 
                    new Class[] { Gen.class });
            return maker.invoke(null, new Object[] { this });
        } catch (NoSuchMethodException e) {
            throw new TestException("Missing arbitrary() definition on: "
                    + arbitraryT.getName());
        } catch (InvocationTargetException e) {
            throw new TestException(arbitraryT.getName() + ".arbitrary() threw " +
                    e.getCause());
        } catch (IllegalAccessException e) {
            throw new TestException(e.toString());
        }
    }