private static <T> void assignArrayField(T instance, Field array, int dimensions, Class<?> elementType, String valueString, IAutoConfigParser<?> parser, IAutoConfigValidator<?> validator) throws Exception
	{
		if (dimensions == 1)
		{
			if (!PATTERN_ARR_ONE_DIM.matcher(valueString).matches())
			{
				throw new Exception("Wrong format for one dimensional array!");
			}

			valueString = valueString.substring(1, valueString.length() - 1);
			String[] values = PATTERN_SPLIT_ARR_ELEMENTS.split(valueString);
			Object oneDimArray = Array.newInstance(elementType, values.length);
			fillOneDimArray(oneDimArray, values, parser, validator);
			assignField(instance, array, oneDimArray);
		}
		else
		{
			Matcher m = PATTERN_ARR_TWO_DIM.matcher(valueString);
			if (!m.find())
			{
				throw new Exception("Wrong format for two dimensional array!");
			}

			String group1 = m.group(1);
			valueString = group1.substring(1, group1.length() - 1);
			String[] oneDims = PATTERN_SPLIT_ONE_DIMS.split(valueString);
			Object twoDimArray = Array.newInstance(array.getType().getComponentType(), oneDims.length);
			for (int i = 0;i < oneDims.length;++ i)
			{
				String[] values = PATTERN_SPLIT_ARR_ELEMENTS.split(oneDims[i]);
				Object oneDimArray = Array.newInstance(elementType, values.length);
				fillOneDimArray(oneDimArray, values, parser, validator);
				Array.set(twoDimArray, i, oneDimArray);
			}
			assignField(instance, array, twoDimArray);
		}
	}