1 22 package org.jboss.test.xml.mbeanserver; 23 24 import javax.xml.namespace.QName ; 25 26 import org.jboss.xb.binding.GenericValueContainer; 27 28 36 public class ModuleOptionContainer 37 implements GenericValueContainer 38 { 39 private String name; 40 private Object value; 41 42 43 46 public Object getValue() 47 { 48 return value; 49 } 50 51 57 public void setValue(Object value) 58 { 59 this.value = value; 60 } 61 62 68 public void addChild(QName name, Object value) 69 { 70 if("name".equals(name.getLocalPart())) 71 { 72 this.name = (String )value; 73 } 74 else 75 { 76 this.value = value; 77 } 78 } 79 80 public Object instantiate() 81 { 82 ModuleOption option = new ModuleOption(name); 83 option.setValue(value); 84 return option; 85 } 86 87 public Class getTargetClass() 88 { 89 return ModuleOption.class; 90 } 91 } 92 | Popular Tags |