public static Object parseArg(Class<?> c, String arg,
			Map<String, InspectedObject> savedObjects)
			throws IllegalArgumentException, IllegalAccessException,
			InvocationTargetException, SecurityException,
			NoSuchMethodException, InstantiationException {

		if (isChar(arg)) {
			if (isPrimitive(c) && arg.length() - 2 != 0) {
				return matches.get(c).newInstance(arg.charAt(1));
			} else {
				arg = arg.substring(1, arg.length() - 1);
			}
		}

		if (isSaved(arg)) {
			return parseArg(c, savedObjects.get(arg.substring(1)).getObject()
					.toString(), savedObjects);
		}

		if (isPrimitive(c)) {
			return matches.get(c).newInstance(arg);
		}

		if (isString(arg)) {
			return arg.substring(1, arg.length() - 1);
		}

		return arg;
	}