Java Collection Check isCollectionOrArrayType(Class typeToCheck)

Here you can find the source of isCollectionOrArrayType(Class typeToCheck)

Description

is Collection Or Array Type

License

Open Source License

Declaration

private static boolean isCollectionOrArrayType(Class<?> typeToCheck) 

Method Source Code


//package com.java2s;

import java.util.Collection;

public class Main {
    private static boolean isCollectionOrArrayType(Class<?> typeToCheck) {
        return typeToCheck != null && (typeToCheck.isArray() || Collection.class.isAssignableFrom(typeToCheck));
    }/*from w  w  w  .j  a v  a  2s . c om*/
}

Related

  1. isCollection(String type)
  2. isCollectional(final Class type)
  3. isCollectionOrArray(Class type)
  4. isCollectionOrArray(final Class cls)
  5. isCollectionOrArray(final Object obj)
  6. isCollectionType(Class aClass)
  7. isCollectionType(Class type)
  8. isCollectionType(Class cls)
  9. isCollectionType(Class cls)