Here you can find the source of isArrayOrCollection(Object v)
static public boolean isArrayOrCollection(Object v)
//package com.java2s; import java.util.Collection; public class Main { static public boolean isArrayOrCollection(Object v) { return v != null && (v.getClass().isArray() || v instanceof Collection<?>); }/*from w w w .j av a 2 s. c o m*/ static public boolean isArray(Object v) { return v != null && v.getClass().isArray(); } }