}
private ConfigurationElement findConfigurationElement(Element e, Class<?> bean) {
ConfigurationElement result = null;
ConfigurationElement ces[] = null;
ConfigurationElements configurationElements = bean.getAnnotation(ConfigurationElements.class);
ConfigurationElement configurationElement = bean.getAnnotation(ConfigurationElement.class);
String parentName = ((Element)e.getParentNode()).getTagName();
if(parentName.equals("namedCache"))
parentName = "default";
if (configurationElement != null) {
ces = new ConfigurationElement[] { configurationElement };
}
if (configurationElements != null) {
ces = configurationElements.elements();
}
if (ces != null) {
for (ConfigurationElement el : ces) {
if (el.name().equals(e.getNodeName()) && el.parent().equals(parentName)) {
result = el;