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);
	}
}


posted @ 2014-01-05 18:12  MrMrCash  阅读(183)  评论(0编辑  收藏  举报