1 4 package com.tc.config.schema.dynamic; 5 6 import org.apache.xmlbeans.XmlObject; 7 8 import com.tc.config.schema.context.ConfigContext; 9 10 13 public class BooleanXPathBasedConfigItem extends XPathBasedConfigItem implements BooleanConfigItem { 14 15 public BooleanXPathBasedConfigItem(ConfigContext context, String xpath, boolean defaultValue) { 16 super(context, xpath, new Boolean (defaultValue)); 17 } 18 19 public BooleanXPathBasedConfigItem(ConfigContext context, String xpath) { 20 super(context, xpath); 21 } 22 23 protected Object fetchDataFromXmlObject(XmlObject xmlObject) { 24 return super.fetchDataFromXmlObjectByReflection(xmlObject, "getBooleanValue"); 25 } 26 27 public boolean getBoolean() { 28 return ((Boolean ) getObject()).booleanValue(); 29 } 30 31 } 32 | Popular Tags |