joinpoint.setParameters(params);
return joinpoint;
}
private static void configure(BeanInfo beanInfo, Module module, Object bean, PropertyConfig pc, boolean nullify) throws Throwable {
ValueConfig value = pc.getValue();
Class<?> clazz = null;
String type = pc.getType(); // check property
if (type == null)
type = value.getType(); // check value
if (type != null)
clazz = module.getClassLoader().loadClass(type);
Method setter = beanInfo.getSetter(pc.getPropertyName(), clazz);
MethodJoinpoint joinpoint = new MethodJoinpoint(setter);
ValueConfig param = (nullify == false) ? value : null;
joinpoint.setParameters(new ValueConfig[]{param});
joinpoint.setTarget(new ImmediateValue<Object>(bean));
joinpoint.dispatch();
}