/* */ package org.jboss.kernel.plugins.deployment.xml;
/* */
/* */ import javax.xml.namespace.QName;
/* */ import org.jboss.beans.metadata.plugins.AbstractMapMetaData;
/* */ import org.jboss.beans.metadata.plugins.AbstractValueMetaData;
/* */ import org.jboss.beans.metadata.spi.MetaDataVisitorNode;
/* */ import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
/* */
/* */ public class MapEntryInterceptor extends DefaultElementInterceptor
/* */ {
/* 40 */ public static final MapEntryInterceptor INTERCEPTOR = new MapEntryInterceptor();
/* */
/* */ public void add(Object parent, Object child, QName name)
/* */ {
/* 44 */ AbstractMapMetaData map = (AbstractMapMetaData)parent;
/* 45 */ MapEntry entry = (MapEntry)child;
/* 46 */ AbstractValueMetaData entryKey = (AbstractValueMetaData)entry.key;
/* 47 */ if (entryKey == null)
/* 48 */ throw new IllegalArgumentException("No key in map entry");
/* 49 */ AbstractValueMetaData entryValue = (AbstractValueMetaData)entry.value;
/* 50 */ if (entryValue == null)
/* 51 */ throw new IllegalArgumentException("No value in map entry");
/* 52 */ map.put((MetaDataVisitorNode)entryKey.getValue(), (MetaDataVisitorNode)entryValue.getValue());
/* */ }
/* */ }
/* Location: /home/mnovotny/projects/EMBEDDED_JBOSS_BETA3_COMMUNITY/embedded/output/lib/embedded-jboss/lib/jboss-embedded-all.jar
* Qualified Name: org.jboss.kernel.plugins.deployment.xml.MapEntryInterceptor
* JD-Core Version: 0.6.0
*/