/** * Construct an object for the class of the given type regardless of whether it has a default constructor, * this will construct anything which has a valid class type including primitives, * arrays, collections and even classes without default constructors, * this will attempt to use the default constructor first if available though. * It must be possible to construct the class without knowing something about it beforehand, * (i.e. classes with only constructors which require non-null arguments will not be able * to be constructed) * * @param <T> * @param beanClass any object class * @return the newly constructed object of the given class type * (if primitive then a wrapped object will be returned which java will unwrap automatically) */ public <T> T constructClass(Class<T> beanClass) { return getConstructorUtils().constructClass(beanClass); }
/** * Construct an object for the class of the given type regardless of whether it has a default constructor, * this will construct anything which has a valid class type including primitives, * arrays, collections and even classes without default constructors, * this will attempt to use the default constructor first if available though. * It must be possible to construct the class without knowing something about it beforehand, * (i.e. classes with only constructors which require non-null arguments will not be able * to be constructed) * * @param <T> * @param beanClass any object class * @return the newly constructed object of the given class type * (if primitive then a wrapped object will be returned which java will unwrap automatically) */ public <T> T constructClass(Class<T> beanClass) { return getConstructorUtils().constructClass(beanClass); }
implementationType = ConstructorUtils.getClassFromInterface(implementationType); convert = getConstructorUtils().constructClass(implementationType); if ( ConstructorUtils.isClassArray(fromType) ) {
implementationType = ConstructorUtils.getClassFromInterface(implementationType); convert = getConstructorUtils().constructClass(implementationType); if ( ConstructorUtils.isClassArray(fromType) ) {
implementationType = ArrayOrderedMap.class; convert = (Map<String, Object>) getConstructorUtils().constructClass(implementationType); if ( ConstructorUtils.isClassArray(fromType) ) {
implementationType = ArrayOrderedMap.class; convert = (Map<String, Object>) getConstructorUtils().constructClass(implementationType); if ( ConstructorUtils.isClassArray(fromType) ) {
newC = constructClass(type); } else { int paramsCount = params.length;
newC = constructClass(type); } else { int paramsCount = params.length;
&& ! ConstructorUtils.isClassSimple(toType) ) { convert = getConstructorUtils().constructClass(toType);
&& ! ConstructorUtils.isClassSimple(toType) ) { convert = getConstructorUtils().constructClass(toType);
dest = getConstructorUtils().constructClass(targetType);
dest = getConstructorUtils().constructClass(targetType);
nestedBean = getConstructorUtils().constructClass(type); setFieldValue(obj, next, nestedBean, false); // need to put this new object into the parent } catch (RuntimeException e) {
nestedBean = getConstructorUtils().constructClass(type); setFieldValue(obj, next, nestedBean, false); // need to put this new object into the parent } catch (RuntimeException e) {
copy = getConstructorUtils().constructClass(beanClass); // make new list for (Object element : (Collection) bean) { Object clone = internalDeepClone(element, dest, maxDepth, null, currentDepth, ignoreNulls, ignoreTransient); copy = getConstructorUtils().constructClass(beanClass); // make new map for (Object key : ((Map) bean).keySet()) { if ( fieldNamesToSkip != null copy = getConstructorUtils().constructClass(beanClass); // make new bean
copy = getConstructorUtils().constructClass(beanClass); // make new list for (Object element : (Collection) bean) { Object clone = internalDeepClone(element, dest, maxDepth, null, currentDepth, ignoreNulls, ignoreTransient); copy = getConstructorUtils().constructClass(beanClass); // make new map for (Object key : ((Map) bean).keySet()) { if ( fieldNamesToSkip != null copy = getConstructorUtils().constructClass(beanClass); // make new bean