public Object getValue(TypeInfo info, ClassLoader cl) throws Throwable { return value.getValue(info, cl); }
public Object dispatch() throws Throwable { return vmd.getValue(info, cl); }
/** * Get the parameters * * @param trace whether trace is enabled * @param cl the classloader * @param pinfos the parameter infos * @param parameters the parameter metadata * @return an array of parameters * @throws Throwable for any error */ public static Object[] getParameters(boolean trace, ClassLoader cl, TypeInfo[] pinfos, List<ParameterMetaData> parameters) throws Throwable { if (parameters == null) return null; Object[] params = new Object[parameters.size()]; int x = 0; for (Iterator<ParameterMetaData> i = parameters.iterator(); i.hasNext();) { ParameterMetaData pdata = i.next(); ValueMetaData vmd = pdata.getValue(); params[x] = vmd.getValue(pinfos[x], cl); x++; } return params; }
Object object = clVMD.getValue(null, tcl); if (object != null && object instanceof ClassLoader == false) throw new IllegalArgumentException("Configured object is not a classloader " + metaData);
@SuppressWarnings("unchecked") public Object getValue(TypeInfo info, ClassLoader cl) throws Throwable { Collection result = getTypeInstance(info, cl, Collection.class); TypeInfo elementTypeInfo = getElementClassInfo(cl, info); for (int i = 0; i < collection.size(); ++i) { ValueMetaData vmd = (ValueMetaData) collection.get(i); Object value = vmd.getValue(elementTypeInfo, cl); try { result.add(value); } catch (UnsupportedOperationException e) { if (i != 0) throw e; result = getTypeInstance(info, cl, Collection.class, false); result.add(value); } } return result; }
/** * Configure a bean property * * @param trace whether trace is enabled * @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(boolean trace, Object object, PropertyInfo info, ClassLoader cl, PropertyMetaData metaData) throws Throwable { if (trace) log.trace("Configuring info=" + info + " metaData=" + metaData); if (trace) log.trace("Setting property " + info); info.set(object, metaData.getValue().getValue(info.getType(), cl)); }
ValueMetaData vmd = entry.getValue(); PropertyInfo pi = info.getProperty(property); pi.set(result, vmd.getValue(pi.getType(), loader));
public MetaValue getValue(BeanInfo beanInfo, ManagedProperty property, AbstractBeanMetaData attachment) { String name = property.getName(); PropertyMetaData pmd = getExactPropertyMetaData(attachment, name); PropertyInfo propertyInfo = beanInfo.getProperty(name); ValueMetaData valueMetaData = pmd.getValue(); try { Object value = valueMetaData.getValue(propertyInfo.getType(), getClassLoader(attachment)); return metaValueFactory.create(value, propertyInfo.getType()); } catch (Throwable t) { throw new UndeclaredThrowableException(t); } }
parameters[i] = pmd.getValue().getValue(typeInfo, classLoader);
public MetaValue getValue(BeanInfo beanInfo, ManagedProperty property, MetaData metaData, AbstractBeanMetaData attachment) { String name = property.getName(); PropertyMetaData pmd = getExactPropertyMetaData(attachment, name); PropertyInfo propertyInfo = beanInfo.getProperty(name); ValueMetaData valueMetaData = pmd.getValue(); try { Object value = valueMetaData.getValue(propertyInfo.getType(), getClassLoader(attachment)); return metaValueFactory.create(value, propertyInfo.getType()); } catch (Throwable t) { throw new UndeclaredThrowableException(t); } }
Object value = valueMetaData.getValue(typeInfo, cl); validatePropertyValue(context, target, propertyInfo, value); beanInfo.setProperty(target, name, value);
if (factory != null) Object target = factory.getValue(null, cl); classInfo = configurator.getClassInfo(target.getClass());
Object factory = vmd.getValue(null, cl);