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