org.jboss.xb.builder.runtime
Class GroupBeanHandler

java.lang.Object
  extended by org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler
      extended by org.jboss.xb.builder.runtime.BeanHandler
          extended by org.jboss.xb.builder.runtime.GroupBeanHandler
All Implemented Interfaces:
ElementHandler, ParticleHandler

public class GroupBeanHandler
extends BeanHandler

A GroupBeanHandler. Before creating a new instance for the group during unmarshalling, this handler will try to obtain the current value of the group from the parent object using the property the group is bound to. If the current group value is not null then it will be returned, otherwise a new instance will be created. This is necessary to support unordered sequences. If the property for the group is not readable then the step to get the group value will be skipped. It doesn't have to be a requirement for the property to be readable.

Version:
$Revision: 1.1 $
Author:
Alexey Loubyansky

Field Summary
 
Fields inherited from class org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler
INSTANCE
 
Constructor Summary
GroupBeanHandler(String name, BeanAdapterFactory beanAdapterFactory)
           
 
Method Summary
 Object startParticle(Object parent, QName qName, ParticleBinding particle, Attributes attrs, NamespaceContext nsCtx)
           
 
Methods inherited from class org.jboss.xb.builder.runtime.BeanHandler
endParticle, getBeanAdapterFactory, setParent
 
Methods inherited from class org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler
attributes, endElement, setParent, startElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupBeanHandler

public GroupBeanHandler(String name,
                        BeanAdapterFactory beanAdapterFactory)
Method Detail

startParticle

public Object startParticle(Object parent,
                            QName qName,
                            ParticleBinding particle,
                            Attributes attrs,
                            NamespaceContext nsCtx)
Specified by:
startParticle in interface ParticleHandler
Overrides:
startParticle in class BeanHandler


Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.