/** * @param type any class * @return true if this class is a primitive or other simple class (like String or immutable) */ public static boolean isClassSimple(Class<?> type) { checkNull(type); boolean simple = false; if ( isClassPrimitive(type) || getImmutableTypes().contains(type)) { simple = true; } return simple; }
/** * @param type any class * @return true if this class is a primitive or other simple class (like String or immutable) */ public static boolean isClassSimple(Class<?> type) { checkNull(type); boolean simple = false; if ( isClassPrimitive(type) || getImmutableTypes().contains(type)) { simple = true; } return simple; }
/** * Get the wrapper class for this class if there is one * @param beanClass any class * @return the wrapper class if there is one OR just returns the given class */ public static Class<?> getWrapper(final Class<?> beanClass) { Class<?> wrapper = null; if (beanClass != null) { if ( isClassPrimitive(beanClass) ) { wrapper = getPrimitiveToWrapper().get(beanClass); } else if ( isClassArray(beanClass) && beanClass.getComponentType().isPrimitive()) { wrapper = getPrimitiveToWrapper().get(beanClass); } else { wrapper = beanClass; } if (wrapper == null) { wrapper = beanClass; } } return wrapper; }
/** * Get the wrapper class for this class if there is one * @param beanClass any class * @return the wrapper class if there is one OR just returns the given class */ public static Class<?> getWrapper(final Class<?> beanClass) { Class<?> wrapper = null; if (beanClass != null) { if ( isClassPrimitive(beanClass) ) { wrapper = getPrimitiveToWrapper().get(beanClass); } else if ( isClassArray(beanClass) && beanClass.getComponentType().isPrimitive()) { wrapper = getPrimitiveToWrapper().get(beanClass); } else { wrapper = beanClass; } if (wrapper == null) { wrapper = beanClass; } } return wrapper; }
if ( ConstructorUtils.isClassPrimitive(type) ) {
if ( ConstructorUtils.isClassPrimitive(type) ) {
if ( isClassPrimitive(type) ) { if (getPrimitiveDefaults().containsKey(type)) { newC = (T) getPrimitiveDefaults().get(type);
if ( isClassPrimitive(type) ) { if (getPrimitiveDefaults().containsKey(type)) { newC = (T) getPrimitiveDefaults().get(type);