Java Class Type Check isComposite(Class cls)

Here you can find the source of isComposite(Class cls)

Description

is Composite

License

Open Source License

Declaration

public static boolean isComposite(Class<?> cls) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.*;

public class Main {
    public static boolean isComposite(Class<?> cls) {
        return isArray(cls) || isCollection(cls);
    }/* w ww  .  j a  v a2s.c  om*/

    public static <T> boolean isArray(Class<T> cls) {
        return cls.isArray();
    }

    public static <T> boolean isCollection(Class<T> cls) {
        return Collection.class.isAssignableFrom(cls);
    }
}

Related

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