Java Class Type Check isSimpleType(Class clazz)

Here you can find the source of isSimpleType(Class clazz)

Description

is Simple Type

License

Open Source License

Declaration

public static boolean isSimpleType(Class clazz) 

Method Source Code


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

import java.util.*;

public class Main {
    private static final Set<Class> SIMPLE_TYPES = new HashSet<Class>(
            Arrays.asList(String.class, Date.class, Calendar.class, Boolean.class, Character.class, Byte.class,
                    Short.class, Integer.class, Long.class, Float.class, Double.class, Void.class));

    public static boolean isSimpleType(Class clazz) {
        return clazz.isPrimitive() || clazz.isEnum() || SIMPLE_TYPES.contains(clazz);
    }/*from   w  ww.  j ava 2s .  co  m*/
}

Related

  1. isPrimitiveType(Class clazz)
  2. isPrimitiveType(String className)
  3. isPrimitiveWrapper(Class clazz)
  4. isPrimitiveWrapper(Class type)
  5. isSimpleClass(Class clazz)
  6. isSupportedParameter(Class type)
  7. isTerminal(Class clazz)
  8. isTypeConvertible(Class srcType, Class destType)
  9. isUniformCollection(Collection c, Class e)