Here you can find the source of isNativeType(final Class type)
Parameter | Description |
---|---|
type | java.lang.Class type to be tested |
public static boolean isNativeType(final Class type)
//package com.java2s; import java.math.BigDecimal; public class Main { /**//from w ww . jav a 2s . c om * Returns true if the provided class is a type supported natively (as * opposed to a bean). * * @param type {@link java.lang.Class} type to be tested */ public static boolean isNativeType(final Class type) { // to return an arbitrary object use Object.class return (type == boolean.class || type == Boolean.class || type == byte.class || type == Byte.class || type == short.class || type == Short.class || type == int.class || type == Integer.class || type == long.class || type == Long.class || type == float.class || type == Float.class || type == double.class || type == Double.class || type == char.class || type == Character.class || type == byte[].class || type == Byte[].class || type == char[].class || type == Character[].class || type == String.class || type == BigDecimal.class || type == java.util.Date.class || type == java.sql.Date.class || type == java.sql.Time.class || type == java.sql.Timestamp.class || type == java.io.InputStream.class || type == java.io.Reader.class || type == java.sql.Clob.class || type == java.sql.Blob.class || type == Object.class); } }