use of com.dtflys.forest.annotation.BindingVar in project forest by dromara.
the class ForestBeanProcessor method processBean.
private void processBean(Object bean, Class beanClass) {
Method[] methods = beanClass.getDeclaredMethods();
for (Method method : methods) {
BindingVar annotation = method.getAnnotation(BindingVar.class);
if (annotation == null) {
continue;
}
String confId = annotation.configuration();
ForestConfiguration configuration = null;
if (StringUtils.isNotBlank(confId)) {
configuration = Forest.config(confId);
} else {
configuration = Forest.config();
}
String varName = annotation.value();
SpringVariableValue variableValue = new SpringVariableValue(bean, method);
configuration.setVariableValue(varName, variableValue);
}
}
Aggregations