1 22 package org.jboss.kernel.plugins.deployment.xml; 23 24 import java.util.HashSet ; 25 import java.util.Set ; 26 27 import javax.xml.namespace.QName ; 28 29 import org.jboss.beans.metadata.plugins.AbstractBeanMetaData; 30 import org.jboss.beans.metadata.plugins.AbstractPropertyMetaData; 31 import org.jboss.beans.metadata.spi.PropertyMetaData; 32 import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor; 33 34 40 public class BeanPropertyInterceptor extends DefaultElementInterceptor 41 { 42 43 public static final BeanPropertyInterceptor INTERCEPTOR = new BeanPropertyInterceptor(); 44 45 public void add(Object parent, Object child, QName name) 46 { 47 AbstractBeanMetaData bean = (AbstractBeanMetaData) parent; 48 AbstractPropertyMetaData property = (AbstractPropertyMetaData) child; 49 Set <PropertyMetaData> properties = bean.getProperties(); 50 if (properties == null) 51 { 52 properties = new HashSet <PropertyMetaData>(); 53 bean.setProperties(properties); 54 } 55 properties.add(property); 56 } 57 } 58 | Popular Tags |