/* 769 */ beanType.pushInterceptor(supplyQName, new DefaultElementInterceptor()
/* */ {
/* */ public void add(Object parent, Object child, QName name)
/* */ {
/* 773 */ AbstractBeanMetaData bean = (AbstractBeanMetaData)parent;
/* 774 */ AbstractSupplyMetaData supply = (AbstractSupplyMetaData)child;
/* 775 */ Set supplies = bean.getSupplies();
/* 776 */ if (supplies == null)
/* */ {
/* 778 */ supplies = new HashSet();
/* 779 */ bean.setSupplies(supplies);
/* */ }
/* 781 */ supplies.add(supply);
/* */ }
/* */ });
/* 786 */ beanFactoryType.pushInterceptor(supplyQName, new DefaultElementInterceptor()
/* */ {
/* */ public void add(Object parent, Object child, QName name)
/* */ {
/* 790 */ AbstractBeanMetaData bean = (AbstractBeanMetaData)parent;
/* 791 */ AbstractSupplyMetaData supply = (AbstractSupplyMetaData)child;
/* 792 */ Set supplies = bean.getSupplies();
/* 793 */ if (supplies == null)
/* */ {
/* 795 */ supplies = new HashSet();
/* 796 */ bean.setSupplies(supplies);
/* */ }
/* 798 */ supplies.add(supply);
/* */ }
/* */ });
/* 803 */ TypeBinding propertyType = schemaBinding.getType(propertyTypeQName);
/* 804 */ configureValueBindings(propertyType);
/* 805 */ propertyType.setHandler(new DefaultElementHandler()
/* */ {
/* */ public Object startElement(Object parent, QName name, ElementBinding element)
/* */ {
/* 809 */ return new AbstractPropertyMetaData();
/* */ }
/* */
/* */ public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
/* */ {
/* 814 */ AbstractPropertyMetaData property = (AbstractPropertyMetaData)o;
/* 815 */ for (int i = 0; i < attrs.getLength(); i++)
/* */ {
/* 817 */ String localName = attrs.getLocalName(i);
/* 818 */ if ("name".equals(localName)) {
/* 819 */ property.setName(attrs.getValue(i));
/* 820 */ } else if ("preinstantiate".equals(localName)) {
/* 821 */ property.setPreInstantiate(Boolean.parseBoolean(attrs.getValue(i))); } else {
/* 822 */ if ((!"class".equals(localName)) && (!"replace".equals(localName)) && (!"trim".equals(localName))) {
/* */ continue;
/* */ }
/* 825 */ org.jboss.beans.metadata.spi.ValueMetaData vmd = property.getValue();
/* */ StringValueMetaData svmd;
/* 826 */ if ((vmd == null) || (!(vmd instanceof StringValueMetaData)))
/* */ {
/* 828 */ StringValueMetaData svmd = new StringValueMetaData();
/* 829 */ property.setValue(svmd);
/* */ }
/* */ else
/* */ {
/* 833 */ svmd = (StringValueMetaData)vmd;
/* */ }
/* 835 */ if ("class".equals(localName))
/* 836 */ svmd.setType(attrs.getValue(i));
/* 837 */ else if ("replace".equals(localName))
/* 838 */ svmd.setReplace(Boolean.parseBoolean(attrs.getValue(i)));
/* 839 */ else if ("trim".equals(localName))
/* 840 */ svmd.setTrim(Boolean.parseBoolean(attrs.getValue(i)));
/* */ }
/* */ }
/* */ }
/* */
/* */ public Object endElement(Object o, QName qName, ElementBinding element)
/* */ {
/* 847 */ AbstractPropertyMetaData x = (AbstractPropertyMetaData)o;
/* 848 */ String name = x.getName();
/* 849 */ if ((name == null) || (name.trim().length() == 0))
/* 850 */ throw new IllegalArgumentException("Null or empty property name.");
/* 851 */ return o;
/* */ }
/* */ });
/* 856 */ propertyType.setSimpleType(new CharactersHandler()
/* */ {
/* */ public Object unmarshal(QName qName, TypeBinding typeBinding, NamespaceContext nsCtx, org.jboss.xb.binding.metadata.ValueMetaData valueMetaData, String value)
/* */ {
/* 860 */ return new StringValueMetaData(value);
/* */ }
/* */
/* */ public void setValue(QName qName, ElementBinding element, Object owner, Object value)
/* */ {
/* 865 */ AbstractPropertyMetaData property = (AbstractPropertyMetaData)owner;
/* 866 */ StringValueMetaData svmd = (StringValueMetaData)value;
/* 867 */ org.jboss.beans.metadata.spi.ValueMetaData vmd = property.getValue();
/* 868 */ if ((vmd != null) && ((vmd instanceof StringValueMetaData)))
/* */ {
/* 870 */ StringValueMetaData previous = (StringValueMetaData)vmd;
/* 871 */ svmd.setReplace(previous.isReplace());
/* 872 */ svmd.setTrim(previous.isTrim());
/* 873 */ String type = previous.getType();
/* 874 */ if (type != null)
/* 875 */ svmd.setType(type);
/* */ }
/* 877 */ property.setValue(svmd);
/* */ }
/* */ });
/* 882 */ TypeBinding dependsType = schemaBinding.getType(dependsTypeQName);
/* 883 */ dependsType.setHandler(new DefaultElementHandler()
/* */ {
/* */ public Object startElement(Object parent, QName name, ElementBinding element)
/* */ {
/* 887 */ return new AbstractDependencyMetaData();
/* */ }
/* */
/* */ public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
/* */ {
/* */ }
/* */
/* */ public Object endElement(Object o, QName qName, ElementBinding element)
/* */ {
/* 896 */ AbstractDependencyMetaData x = (AbstractDependencyMetaData)o;
/* 897 */ String name = (String)x.getDependency();
/* 898 */ if ((name == null) || (name.trim().length() == 0))
/* 899 */ throw new IllegalArgumentException("Null or empty dependency.");
/* 900 */ return o;
/* */ }
/* */ });
/* 905 */ dependsType.setSimpleType(new CharactersHandler()
/* */ {
/* */ public Object unmarshal(QName qName, TypeBinding typeBinding, NamespaceContext nsCtx, org.jboss.xb.binding.metadata.ValueMetaData valueMetaData, String value)
/* */ {
/* 909 */ return value;
/* */ }
/* */
/* */ public void setValue(QName qname, ElementBinding element, Object owner, Object value)
/* */ {
/* 914 */ AbstractDependencyMetaData depends = (AbstractDependencyMetaData)owner;
/* 915 */ depends.setDependency(value);
/* */ }
/* */ });
/* 920 */ TypeBinding demandType = schemaBinding.getType(demandTypeQName);
/* 921 */ demandType.setHandler(new DefaultElementHandler()
/* */ {
/* */ public Object startElement(Object parent, QName name, ElementBinding element)
/* */ {
/* 925 */ return new AbstractDemandMetaData();
/* */ }
/* */
/* */ public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
/* */ {
/* 930 */ AbstractDemandMetaData demand = (AbstractDemandMetaData)o;
/* 931 */ for (int i = 0; i < attrs.getLength(); i++)
/* */ {
/* 933 */ String localName = attrs.getLocalName(i);
/* 934 */ if ("state".equals(localName))
/* 935 */ demand.setWhenRequired(new ControllerState(attrs.getValue(i)));
/* */ }
/* */ }
/* */
/* */ public Object endElement(Object o, QName qName, ElementBinding element)
/* */ {
/* 941 */ AbstractDemandMetaData x = (AbstractDemandMetaData)o;
/* 942 */ String name = (String)x.getDemand();
/* 943 */ if ((name == null) || (name.trim().length() == 0))
/* 944 */ throw new IllegalArgumentException("Null or empty demand.");
/* 945 */ return o;
/* */ }
/* */ });
/* 950 */ demandType.setSimpleType(new CharactersHandler()
/* */ {
/* */ public Object unmarshal(QName qName, TypeBinding typeBinding, NamespaceContext nsCtx, org.jboss.xb.binding.metadata.ValueMetaData valueMetaData, String value)
/* */ {
/* 954 */ return value;
/* */ }
/* */
/* */ public void setValue(QName qname, ElementBinding element, Object owner, Object value)
/* */ {
/* 959 */ AbstractDemandMetaData demand = (AbstractDemandMetaData)owner;
/* 960 */ demand.setDemand(value);
/* */ }
/* */ });
/* 965 */ TypeBinding supplyType = schemaBinding.getType(supplyTypeQName);
/* 966 */ supplyType.setHandler(new DefaultElementHandler()
/* */ {
/* */ public Object startElement(Object parent, QName name, ElementBinding element)
/* */ {
/* 970 */ return new AbstractSupplyMetaData();
/* */ }
/* */
/* */ public Object endElement(Object o, QName qName, ElementBinding element)
/* */ {
/* 975 */ AbstractSupplyMetaData x = (AbstractSupplyMetaData)o;
/* 976 */ String name = (String)x.getSupply();
/* 977 */ if ((name == null) || (name.trim().length() == 0))
/* 978 */ throw new IllegalArgumentException("Null or empty supply.");
/* 979 */ return o;
/* */ }
/* */ });
/* 984 */ supplyType.setSimpleType(new CharactersHandler()
/* */ {
/* */ public Object unmarshal(QName qName, TypeBinding typeBinding, NamespaceContext nsCtx, org.jboss.xb.binding.metadata.ValueMetaData valueMetaData, String value)
/* */ {
/* 988 */ return value;
/* */ }
/* */
/* */ public void setValue(QName qName, ElementBinding element, Object owner, Object value)
/* */ {
/* 993 */ AbstractSupplyMetaData supply = (AbstractSupplyMetaData)owner;
/* 994 */ supply.setSupply(value);
/* */ }
/* */ });
/* 999 */ TypeBinding dependencyType = schemaBinding.getType(dependencyTypeQName);
/* 1000 */ dependencyType.setHandler(new DefaultElementHandler()
/* */ {