1 22 package org.jboss.kernel.plugins.deployment.xml; 23 24 import javax.xml.namespace.NamespaceContext ; 25 import javax.xml.namespace.QName ; 26 27 import org.jboss.beans.metadata.plugins.AbstractParameterMetaData; 28 import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler; 29 import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding; 30 import org.xml.sax.Attributes ; 31 32 38 public class ParameterHandler extends DefaultElementHandler 39 { 40 41 public static final ParameterHandler HANDLER = new ParameterHandler(); 42 43 public Object startElement(Object parent, QName name, ElementBinding element) 44 { 45 return new AbstractParameterMetaData(); 46 } 47 48 public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx) 49 { 50 AbstractParameterMetaData parameter = (AbstractParameterMetaData) o; 51 for (int i = 0; i < attrs.getLength(); ++i) 52 { 53 String localName = attrs.getLocalName(i); 54 if ("class".equals(localName)) 55 parameter.setType(attrs.getValue(i)); 56 } 57 } 58 } 59 | Popular Tags |