Package org.infinispan.config

Examples of org.infinispan.config.ConfigurationElement


                  if (ce.name().equals(name) && ce.parent().equals(parentName)) {
                     return (AbstractConfigurationBean) clazz.newInstance();
                  }
               }
            } else {
               ConfigurationElement ce = clazz.getAnnotation(ConfigurationElement.class);
               if (ce != null && (ce.name().equals(name) && ce.parent().equals(parentName))) {
                  return (AbstractConfigurationBean) clazz.newInstance();
               }
            }
         } catch (Exception e1) {
            throw new ConfigurationException("Could not instantiate class " + clazz, e1);
View Full Code Here


   AbstractConfigurationBean findAndInstantiateBean(Element e) throws ConfigurationException {
      return findAndInstantiateBean(CONFIG_BEANS,e);
   }
  
   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) {
View Full Code Here

      return result;
   }
  
   private Class<? extends ConfigurationElementReader> customReader(Element e, Class<?> bean) {
      Class<? extends ConfigurationElementReader> clazz = null;
      ConfigurationElement ce = findConfigurationElement(e, bean);
      if (ce == null) {
         for (Class<?> beanClass : CONFIG_BEANS) {
            ce = findConfigurationElement(e, beanClass);
            if (ce != null)
               break;
         }
      }
      if (ce != null && !ce.customReader().equals(ConfigurationElementReader.class)) {
         clazz = ce.customReader();
      }
      return clazz;
   }
View Full Code Here

         sb.append(root.pp(""));
         sb.append("</pre></div>");
        
         tree(configBeans);
         for (Class<?> clazz : configBeans) {
            ConfigurationElement ces[] = null;
            ConfigurationElements configurationElements = clazz.getAnnotation(ConfigurationElements.class);
            ConfigurationElement configurationElement = clazz.getAnnotation(ConfigurationElement.class);

            if (configurationElement != null && configurationElements == null) {
               ces = new ConfigurationElement[]{configurationElement};
            }
            if (configurationElements != null && configurationElement == null) {
View Full Code Here

   }
  
   private TreeNode tree(List<Class<?>>configBeans){
      List<ConfigurationElement> lce = new ArrayList<ConfigurationElement>(7);
      for (Class<?> clazz : configBeans) {
         ConfigurationElement ces[] = null;
         ConfigurationElements configurationElements = clazz.getAnnotation(ConfigurationElements.class);
         ConfigurationElement configurationElement = clazz.getAnnotation(ConfigurationElement.class);

         if (configurationElement != null && configurationElements == null) {
            ces = new ConfigurationElement[]{configurationElement};
         }
         if (configurationElements != null && configurationElement == null) {
View Full Code Here

TOP

Related Classes of org.infinispan.config.ConfigurationElement

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.