标签案例-开发foreach标签

1     if(item.getClass().isArray()){
2         this.collection = new ArrayList();
3         int length = Array.getLength(items);
4         for(int i=0;i<length;i++){
5             Object value = Array.get(items,i);
6             this.collection.add(value);
7         }
8     }
接收任何类型集合或数组的代码

 

posted @ 2014-07-31 22:52  是但哥  阅读(118)  评论(0)    收藏  举报