java_不知道数据类型情况下,数组遍历-反射

if(items.getClass().isArray){
	this.collection = new ArrayList();
	int length = Array.getLength(items);
	for(int i=0;i<length;i++){
		Object value = Array.get(items,i);
		this.collection.add(value);
	}
}


原文地址:https://www.cnblogs.com/MarchThree/p/3720426.html