/** * Configure a bean property * * @param object the object to configure * @param info the property info * @param cl the classloader * @param metaData the property metadata * @throws Throwable for any error */ public static void configure(Object object, PropertyInfo info, ClassLoader cl, PropertyMetaData metaData) throws Throwable { boolean trace = log.isTraceEnabled(); configure(trace, object, info, cl, metaData); }
/** * Configure a bean property * * @param object the object to configure * @param info the bean info * @param cl the classloader * @param metaData the property metadata * @throws Throwable for any error */ public static void configure(Object object, BeanInfo info, ClassLoader cl, PropertyMetaData metaData) throws Throwable { boolean trace = log.isTraceEnabled(); configure(trace, object, info, cl, metaData); }
/** * Instantiate and configure a bean * * @param config the confg * @param info the bean info * @param metaData the bean metadata * @return the instantiated and configured object * @throws Throwable for any error */ public static Object instantiateAndConfigure(KernelConfig config, BeanInfo info, BeanMetaData metaData) throws Throwable { Object result = instantiate(config, info, metaData); if (metaData != null) configure(result, info, metaData); return result; }
/** * Configure a bean * * @param object the object to configure * @param info the bean info * @param metaData the bean metadata * @throws Throwable for any error */ public static void configure(Object object, BeanInfo info, BeanMetaData metaData) throws Throwable { boolean trace = log.isTraceEnabled(); if (object == null) throw new IllegalArgumentException("Null object"); if (info == null) throw new IllegalArgumentException("Null bean info"); if (metaData == null) throw new IllegalArgumentException("Null bean metadata"); Set<PropertyMetaData> properties = metaData.getProperties(); if (properties != null && properties.isEmpty() == false) { ClassLoader cl = getClassLoader(metaData); for (Iterator<PropertyMetaData> i = metaData.getProperties().iterator(); i.hasNext();) { PropertyMetaData property = i.next(); configure(trace, object, info, cl, property); } } }
/** * Configure a bean property * * @param trace whether trace is enabled * @param object the object to configure * @param info the bean info * @param cl the classloader * @param metaData the property metadata * @throws Throwable for any error */ public static void configure(boolean trace, Object object, BeanInfo info, ClassLoader cl, PropertyMetaData metaData) throws Throwable { PropertyInfo ainfo = resolveProperty(trace, info, cl, metaData.getName(), metaData.getType()); configure(trace, object, ainfo, cl, metaData); }