private Class getElementTypeFromGenerics (Type type) {
			if (type instanceof ParameterizedType) {
				ParameterizedType parameterizedType = (ParameterizedType)type;
				Type rawType = parameterizedType.getRawType();

				if (isCollection(rawType) || isMap(rawType)) {
					Type[] actualTypeArguments = parameterizedType.getActualTypeArguments();
					if (actualTypeArguments.length > 0) {
						return (Class)actualTypeArguments[actualTypeArguments.length - 1];
					}
				}
			}
			return null;
		}