JBoss XML Binding 2.0.3.GA-redhat-2

org.jboss.xb.builder.runtime
Class GroupBeanHandler

java.lang.Object
  extended by org.jboss.xb.builder.runtime.GroupBeanHandler
All Implemented Interfaces:
ParticleHandler

public class GroupBeanHandler
extends Object
implements ParticleHandler

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
protected  BeanAdapterFactory beanAdapterFactory
          The BeanAdapter
protected  QName groupName
           
protected static org.jboss.logging.Logger log
          The log
protected  String name
          The bean name
protected  boolean trace
          Whether trace is enabled
 
Constructor Summary
GroupBeanHandler(String name, BeanAdapterFactory beanAdapterFactory, ModelGroupBinding group)
           
 
Method Summary
 Object endParticle(Object o, QName qName, ParticleBinding particle)
           
 void setParent(Object parent, Object o, QName qName, ParticleBinding particle, ParticleBinding parentParticle)
           
 Object startParticle(Object parent, QName qName, ParticleBinding particle, Attributes attrs, NamespaceContext nsCtx)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final org.jboss.logging.Logger log
The log


trace

protected boolean trace
Whether trace is enabled


name

protected String name
The bean name


beanAdapterFactory

protected BeanAdapterFactory beanAdapterFactory
The BeanAdapter


groupName

protected QName groupName
Constructor Detail

GroupBeanHandler

public GroupBeanHandler(String name,
                        BeanAdapterFactory beanAdapterFactory,
                        ModelGroupBinding group)
Method Detail

startParticle

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

setParent

public void setParent(Object parent,
                      Object o,
                      QName qName,
                      ParticleBinding particle,
                      ParticleBinding parentParticle)
Specified by:
setParent in interface ParticleHandler

endParticle

public Object endParticle(Object o,
                          QName qName,
                          ParticleBinding particle)
Specified by:
endParticle in interface ParticleHandler

JBoss XML Binding 2.0.3.GA-redhat-2

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.