Java Class Type Check isCollectionMapOrArray(Class type)

Here you can find the source of isCollectionMapOrArray(Class type)

Description

is Collection Map Or Array

License

Open Source License

Declaration

public static boolean isCollectionMapOrArray(Class<?> type) 

Method Source Code

//package com.java2s;

import java.util.*;

public class Main {
    public static boolean isCollectionMapOrArray(Class<?> type) {
        if (type.isArray())
            return true;
        if (Collection.class.isAssignableFrom(type))
            return true;
        if (Map.class.isAssignableFrom(type))
            return true;
        return false;
    }//from w ww  .  jav  a2  s .c  om
}

Related

  1. isAssignableFrom(Class clazzA, Class clazzB)
  2. isBasicType(Class clazz)
  3. isClassBelowPackage(Class theClass, List packageList)
  4. isCollection(Class clazz)
  5. isCollection(Class cls)
  6. isComposite(Class cls)
  7. isEmptyCollectionOrMap(Object content, Class type)
  8. isInPrimitiveWrapperType(Class type)
  9. isJavaImmutable(Class cls)