@SuppressWarnings({"unchecked"}) public Map<String, ?> buildObjects(Map<String, String> kvPairs) { if (kvPairs != null && !kvPairs.isEmpty()) { BeanConfigurationProcessor processor = new BeanConfigurationProcessor(); for (Map.Entry<String, String> entry : kvPairs.entrySet()) { String lhs = entry.getKey(); String rhs = interpolator.interpolate(entry.getValue()); String beanId = parseBeanId(lhs); if (beanId != null) { //a beanId could be parsed, so the line is a bean instance definition processor.add(new InstantiationStatement(beanId, rhs)); } else { //the line must be a property configuration processor.add(new AssignmentStatement(lhs, rhs)); } } processor.execute(); } //SHIRO-413: init method must be called for constructed objects that are Initializable LifecycleUtils.init(objects.values()); return objects; }
@SuppressWarnings({"unchecked"}) public Map<String, ?> buildObjects(Map<String, String> kvPairs) { if (kvPairs != null && !kvPairs.isEmpty()) { BeanConfigurationProcessor processor = new BeanConfigurationProcessor(); for (Map.Entry<String, String> entry : kvPairs.entrySet()) { String lhs = entry.getKey(); String rhs = interpolator.interpolate(entry.getValue()); String beanId = parseBeanId(lhs); if (beanId != null) { //a beanId could be parsed, so the line is a bean instance definition processor.add(new InstantiationStatement(beanId, rhs)); } else { //the line must be a property configuration processor.add(new AssignmentStatement(lhs, rhs)); } } processor.execute(); } //SHIRO-413: init method must be called for constructed objects that are Initializable LifecycleUtils.init(objects.values()); return objects; }