OMFactory factory = OMAbstractFactory.getOMFactory();
OMElement aspect = factory.createOMElement("aspect", null);
aspect.addAttribute(factory.createOMAttribute("name", null, bean.getName()));
aspect.addAttribute(factory.createOMAttribute("class", null, bean.getReflectionClassName()));
OMElement configuration = factory.createOMElement("configuration", null);
configuration.addAttribute(factory.createOMAttribute("type", null, "literal"));
OMElement lifecycle = factory.createOMElement("lifecycle", null);
LifecycleStateBean[] states = bean.getStates();
for(LifecycleStateBean lifecycleState:states) {
OMElement state = factory.createOMElement("state", null);