Examples of ParticleHandler


Examples of org.jboss.xb.binding.sunday.unmarshalling.ParticleHandler

         }
      }
      );

      // sequence entry
      entrySeq.setHandler(new ParticleHandler()
      {
         public Object startParticle(Object parent,
                                     QName elementName,
                                     ParticleBinding particle,
                                     Attributes attrs,
View Full Code Here

Examples of org.jboss.xb.binding.sunday.unmarshalling.ParticleHandler

      if (childWildcard != null)
      {
         if (beanAdapterFactory.getWildcardHandler() != null)
            throw new RuntimeException("Cannot have both @JBossXmlChildWildcard and @XmlAnyElement");

         ParticleHandler childWildcardHandler = null;
         if (typeInfo.isCollection())
         {
            if (childWildcard.wrapper() != Object.class)
            {
               BeanInfo wrapperInfo = JBossXBBuilder.configuration.getBeanInfo(childWildcard.wrapper());
View Full Code Here

Examples of org.jboss.xb.binding.sunday.unmarshalling.ParticleHandler

            wrapper.setChildParticle(particle);
            wrapper.setParentParticle(parentParticle);
            return;
         }
     
         ParticleHandler particleHandler = elementBinding.getType().getHandler();
         particleHandler.setParent(parent, o, elementName, particle, parentParticle);
      }
   }
View Full Code Here

Examples of org.jboss.xb.binding.sunday.unmarshalling.ParticleHandler

         ArrayWrapper wrapper = (ArrayWrapper) o;
         Object parent = wrapper.getParent();
         ParticleBinding childParticle = wrapper.getChildParticle();
         ParticleBinding parentParticle = wrapper.getParentParticle();
         ElementBinding elementBinding = (ElementBinding) parentParticle.getTerm();
         ParticleHandler particleHandler = elementBinding.getType().getHandler();
         particleHandler.setParent(parent, wrapper, wrapper.getElementName(), childParticle, parentParticle);
         return parent;
      }
      return o;
   }
View Full Code Here

Examples of org.jboss.xb.binding.sunday.unmarshalling.ParticleHandler

                  {
                     Object handler = valueEntry.handler;
                     ParticleBinding childParticle = (ParticleBinding)binding;
                     if(handler instanceof ParticleHandler)
                     {
                        ParticleHandler pHandler = (ParticleHandler)handler;
                        if(childParticle.isRepeatable())
                        {
                           if(parentValueList != null)
                           {
                              parentValueList.addTermValue(valueEntry.qName, childParticle, pHandler, valueEntry.value, null);
                           }
                           else
                           {
                              Collection col = (Collection) valueEntry.value;
                              //System.out.println("newInstance: " + childParticle.getTerm() + "=" + col);
                              pHandler.setParent(parent, col, valueEntry.qName, childParticle, valueEntry.parentParticle);

/*                              for (Iterator iter = col.iterator(); iter.hasNext();)
                              {
                                 pHandler.setParent(parent, iter.next(), valueEntry.qName, childParticle,
                                       valueEntry.parentParticle);
                              }                             
*/
                           }
                        }
                        else
                        {
                           if(parentValueList != null)
                           {
                              parentValueList.addTermValue(valueEntry.qName, childParticle, pHandler, valueEntry.value, valueEntry.parentParticle);
                           }
                           else
                           {
                              pHandler.setParent(parent, valueEntry.value, valueEntry.qName, childParticle, valueEntry.parentParticle);
                           }
                        }
                     }
                     else
                     {
View Full Code Here

Examples of org.jboss.xb.binding.sunday.unmarshalling.ParticleHandler

/* 63 */         wrapper.setChildParticle(particle);
/* 64 */         wrapper.setParentParticle(parentParticle);
/* 65 */         return;
/*    */       }
/*    */
/* 68 */       ParticleHandler particleHandler = elementBinding.getType().getHandler();
/* 69 */       particleHandler.setParent(parent, o, elementName, particle, parentParticle);
/*    */     }
/*    */   }
View Full Code Here

Examples of org.jboss.xb.binding.sunday.unmarshalling.ParticleHandler

/* 78 */       ArrayWrapper wrapper = (ArrayWrapper)o;
/* 79 */       Object parent = wrapper.getParent();
/* 80 */       ParticleBinding childParticle = wrapper.getChildParticle();
/* 81 */       ParticleBinding parentParticle = wrapper.getParentParticle();
/* 82 */       ElementBinding elementBinding = (ElementBinding)parentParticle.getTerm();
/* 83 */       ParticleHandler particleHandler = elementBinding.getType().getHandler();
/* 84 */       particleHandler.setParent(parent, wrapper, wrapper.getElementName(), childParticle, parentParticle);
/* 85 */       return parent;
/*    */     }
/* 87 */     return o;
/*    */   }
View Full Code Here

Examples of org.jboss.xb.binding.sunday.unmarshalling.ParticleHandler

/* 1152 */     if (childWildcard != null)
/*      */     {
/* 1154 */       if (beanAdapterFactory.getWildcardHandler() != null) {
/* 1155 */         throw new RuntimeException("Cannot have both @JBossXmlChildWildcard and @XmlAnyElement");
/*      */       }
/* 1157 */       ParticleHandler childWildcardHandler = null;
/* 1158 */       if (typeInfo.isCollection())
/*      */       {
/* 1160 */         if (childWildcard.wrapper() != Object.class)
/*      */         {
/* 1162 */           BeanInfo wrapperInfo = JBossXBBuilder.configuration.getBeanInfo(childWildcard.wrapper());
View Full Code Here

Examples of org.jboss.xb.binding.sunday.unmarshalling.ParticleHandler

/*     */             {
/* 386 */               Object handler = valueEntry.handler;
/* 387 */               ParticleBinding childParticle = (ParticleBinding)binding;
/* 388 */               if ((handler instanceof ParticleHandler))
/*     */               {
/* 390 */                 ParticleHandler pHandler = (ParticleHandler)handler;
/* 391 */                 if (childParticle.isRepeatable())
/*     */                 {
/* 393 */                   if (this.parentValueList != null)
/*     */                   {
/* 395 */                     this.parentValueList.addTermValue(valueEntry.qName, childParticle, pHandler, valueEntry.value, null);
/*     */                   }
/*     */                   else
/*     */                   {
/* 399 */                     Collection col = (Collection)valueEntry.value;
/*     */
/* 401 */                     pHandler.setParent(this.val$parent, col, valueEntry.qName, childParticle, valueEntry.parentParticle);
/*     */                   }
/*     */
/*     */                 }
/* 413 */                 else if (this.parentValueList != null)
/*     */                 {
/* 415 */                   this.parentValueList.addTermValue(valueEntry.qName, childParticle, pHandler, valueEntry.value, valueEntry.parentParticle);
/*     */                 }
/*     */                 else
/*     */                 {
/* 419 */                   pHandler.setParent(this.val$parent, valueEntry.value, valueEntry.qName, childParticle, valueEntry.parentParticle);
/*     */                 }
/*     */
/*     */               }
/*     */               else
/*     */               {
View Full Code Here

Examples of org.jboss.xb.binding.sunday.unmarshalling.ParticleHandler

      assertNotNull(elementBinding);
      TypeBinding typeBinding = elementBinding.getType();
      if (rootType)
         assertTrue(type == typeBinding);
     
      ParticleHandler particleHandler = typeBinding.getHandler();
      assertNotNull(particleHandler);
      assertTrue(particleHandler instanceof BeanHandler);
      BeanHandler beanInfoElementHandler = (BeanHandler) particleHandler;
      BeanAdapterFactory beanAdapterFactory = beanInfoElementHandler.getBeanAdapterFactory();
      assertTrue(beanAdapterFactory instanceof AbstractBeanAdapterFactory);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.