/** * Unconfigure a bean * * @param object the object to unconfigure * @param info the bean info * @param metaData the bean metadata * @throws Throwable for any error */ public static void unconfigure(Object object, BeanInfo info, BeanMetaData metaData) throws Throwable { 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"); ClassLoader cl = getClassLoader(metaData); Set<PropertyMetaData> propertys = metaData.getProperties(); if (propertys != null && propertys.isEmpty() == false) { for (Iterator<PropertyMetaData> i = metaData.getProperties().iterator(); i.hasNext();) { PropertyMetaData property = i.next(); unconfigure(object, cl, info, property); } } }
/** * Unconfigure a bean property * * @param object the object to unconfigure * @param cl the classloader * @param info the bean info * @param metaData the property metadata * @throws Throwable for any error */ public static void unconfigure(Object object, ClassLoader cl, BeanInfo info, PropertyMetaData metaData) throws Throwable { boolean trace = log.isTraceEnabled(); PropertyInfo ainfo = resolveProperty(trace, info, cl, metaData.getName(), metaData.getType()); unconfigure(trace, object, ainfo, metaData); }