.getChildren();
for (int k = 0; k < beanElements.length; k++) {
IConfigurationElement beanElement = beanElements[k];
GenericBeanDefinition beanDefinition = new GenericBeanDefinition();
// bean id
String beanId = beanElement.getAttribute("id");
// bean class
String beanClassName = beanElement
.getAttribute("class");
beanDefinition.setBeanClass(resolveBeanClass(
beanElement, beanClassName));
if (log.isDebugEnabled()) {
log.debug("found bean for context [" + contextId
+ "]: [id=" + beanId + ";class="
+ beanClassName + "]");
}
// scope
String scope = beanElement.getAttribute("scope");
if (scope != null) {
beanDefinition.setScope(scope);
}
if (log.isDebugEnabled()) {
log.debug("scope: [" + scope + "]");
}
// abstract
String isAbstract = beanElement
.getAttribute("abstract");
if (isAbstract != null) {
beanDefinition.setAbstract(Boolean
.parseBoolean(isAbstract));
}
if (log.isDebugEnabled()) {
log.debug("abstract: [" + isAbstract + "]");
}
// parent
String parentName = beanElement.getAttribute("parent");
if (parentName != null) {
beanDefinition.setParentName(parentName);
}
if (log.isDebugEnabled()) {
log.debug("parent: [" + parentName + "]");
}
// lazy-init
String isLazyInit = beanElement
.getAttribute("lazy-init");
if (isLazyInit != null) {
beanDefinition.setLazyInit(Boolean
.parseBoolean(isLazyInit));
}
if (log.isDebugEnabled()) {
log.debug("lazy-init: [" + isLazyInit + "]");
}
// autowire
String autowireModeString = beanElement
.getAttribute("autowire");
if (autowireModeString != null) {
beanDefinition
.setAutowireMode(resolveAutowireMode(autowireModeString));
}
if (log.isDebugEnabled()) {
log.debug("autowire: [" + autowireModeString + "]");
}
// autowire candidate
String autowireCandidate = beanElement
.getAttribute("autowire-candidate");
if (autowireCandidate != null) {
beanDefinition.setAutowireCandidate(Boolean
.parseBoolean(autowireCandidate));
}
if (log.isDebugEnabled()) {
log.debug("autowire-candidate: ["
+ autowireCandidate + "]");
}
// primary
String isPrimary = beanElement.getAttribute("primary");
if (isPrimary != null) {
beanDefinition.setPrimary(Boolean
.parseBoolean(isPrimary));
}
if (log.isDebugEnabled()) {
log.debug("primary: [" + isPrimary + "]");
}
// init-method
String initMethod = beanElement
.getAttribute("init-method");
if (initMethod != null) {
beanDefinition.setInitMethodName(initMethod);
}
if (log.isDebugEnabled()) {
log.debug("init-method: [" + initMethod + "]");
}
// destroy-method
String destroyMethod = beanElement
.getAttribute("destroy-method");
if (destroyMethod != null) {
beanDefinition.setDestroyMethodName(destroyMethod);
}
if (log.isDebugEnabled()) {
log
.debug("destroy-method: [" + destroyMethod
+ "]");
}
// factory-method
String factoryMethod = beanElement
.getAttribute("factory-method");
if (factoryMethod != null) {
beanDefinition
.setFactoryMethodName("factory-method");
}
if (log.isDebugEnabled()) {
log
.debug("factory-method: [" + factoryMethod
+ "]");
}
// factory-bean
String factoryBean = beanElement
.getAttribute("factory-bean");
if (factoryBean != null) {
beanDefinition.setFactoryBeanName(factoryBean);
}
if (log.isDebugEnabled()) {
log.debug("factory-bean: [" + factoryBean + "]");
}
// constructor values
if (log.isDebugEnabled()) {
log.debug("resolving constructor values");
}
ConstructorArgumentValues constructorArgumentValues = resolveConstructorValues(beanElement);
if (!constructorArgumentValues.isEmpty()) {
beanDefinition
.setConstructorArgumentValues(constructorArgumentValues);
} else if (log.isDebugEnabled()) {
log.debug("no constructor values found");
}
// property values
if (log.isDebugEnabled()) {
log.debug("resolving property values");
}
MutablePropertyValues propertyValues = resolvePropertyValues(beanElement);
if (propertyValues.size() > 0) {
beanDefinition.setPropertyValues(propertyValues);
} else if (log.isDebugEnabled()) {
log.debug("no property values found");
}
if (beanDefinition.getBeanClass() == null) {
if (log.isWarnEnabled()) {
log
.warn("bean class of bean ["
+ beanId
+ "] could not be resolved; it will be ignored");