Package org.jboss.test.xml.config

Examples of org.jboss.test.xml.config.Config


      configType.setHandler(new DefaultElementHandler()
      {
         public Object startElement(Object parent, QName name, ElementBinding element)
         {
            return new Config();
         }
      }
      );

      configType.pushInterceptor(new QName("attribute"), new DefaultElementInterceptor()
      {
         public void add(Object parent, Object child, QName name)
         {
            Config config = (Config)parent;
            Config.ConfigAttr attr = (Config.ConfigAttr)child;
            Collection attrs = config.getAttrs();
            if(attrs == null)
            {
               attrs = new ArrayList();
               config.setAttrs(attrs);
            }
            attrs.add(attr);
         }
      }
      );

      configType.pushInterceptor(new QName("beans"), new DefaultElementInterceptor()
      {
         public void add(Object parent, Object child, QName name)
         {
            Config config = (Config)parent;
            config.beans = (Collection)child;
         }
      }
      );

      configType.pushInterceptor(new QName("list"), new DefaultElementInterceptor()
      {
         public void add(Object parent, Object child, QName name)
         {
            Config config = (Config)parent;
            config.list = (Collection)child;
         }
      }
      );

      configType.pushInterceptor(new QName("map"), new DefaultElementInterceptor()
      {
         public void add(Object parent, Object child, QName name)
         {
            Config config = (Config)parent;
            config.map = (Map)child;
         }
      }
      );
View Full Code Here


      configType.setHandler(new DefaultElementHandler()
      {
         public Object startElement(Object parent, QName name, ElementBinding element)
         {
            return new Config();
         }
      }
      );

      configType.pushInterceptor(new QName("attribute"), new DefaultElementInterceptor()
      {
         public void add(Object parent, Object child, QName name)
         {
            Config config = (Config)parent;
            Config.ConfigAttr attr = (Config.ConfigAttr)child;
            Collection<ConfigAttr> attrs = config.getAttrs();
            if(attrs == null)
            {
               attrs = new ArrayList<ConfigAttr>();
               config.setAttrs(attrs);
            }
            attrs.add(attr);
         }
      }
      );

      configType.pushInterceptor(new QName("beans"), new DefaultElementInterceptor()
      {
         public void add(Object parent, Object child, QName name)
         {
            Config config = (Config)parent;
            config.beans = (Collection<Bean>)child;
         }
      }
      );

      configType.pushInterceptor(new QName("list"), new DefaultElementInterceptor()
      {
         public void add(Object parent, Object child, QName name)
         {
            Config config = (Config)parent;
            config.list = (Collection<Object>)child;
         }
      }
      );

      configType.pushInterceptor(new QName("map"), new DefaultElementInterceptor()
      {
         public void add(Object parent, Object child, QName name)
         {
            Config config = (Config)parent;
            config.map = (Map<?, ?>)child;
         }
      }
      );
View Full Code Here

TOP

Related Classes of org.jboss.test.xml.config.Config

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.