| java.lang.Object com.tc.config.schema.dynamic.XPathBasedConfigItem
All known Subclasses: com.tc.config.schema.dynamic.ObjectArrayXPathBasedConfigItem, com.tc.config.schema.dynamic.BooleanXPathBasedConfigItem, com.tc.config.schema.dynamic.StringArrayXPathBasedConfigItem, com.tc.config.schema.dynamic.StringXPathBasedConfigItem, com.tc.config.schema.dynamic.IntXPathBasedConfigItem, com.tc.config.schema.dynamic.FileXPathBasedConfigItem,
XPathBasedConfigItem | abstract public class XPathBasedConfigItem implements ConfigItem,ConfigurationChangeListener(Code) | | A
ConfigItem that uses XPaths to find its data. Caches the current value for efficiency, and provides for
specification of a default, which it will use if the value is null .
Subclasses must take care of extracting the actual required value from the
XmlObject .
Normally, this class would be doing too much stuff — it handles defaults, caching, and data extraction, all at
once. However, because of the restrictions of Java's type system, doing it any other way seems to lead to an
explosion of classes. If you can figure out a way to factor it that splits up this class but doesn't lead to a class
explosion, by all means, do so.
|
XPathBasedConfigItem | public XPathBasedConfigItem(ConfigContext context, String xpath, Object defaultValue)(Code) | | Generally, you SHOULD NOT use this constructor. Instead, you should let the schema specify the
default, as we want that to be the canonical repository for default values. However, certain things — like
attributes, arrays, and other complex structures — can't have defaults provided in a schema, so we must
provide this method instead.
|
configurationChanged | public synchronized void configurationChanged(XmlObject oldConfig, XmlObject newConfig)(Code) | | |
defaultValue | public Object defaultValue()(Code) | | For TESTS ONLY.
|
fetchDataFromXmlObject | abstract protected Object fetchDataFromXmlObject(XmlObject xmlObject)(Code) | | |
fetchDataFromXmlObjectByReflection | final protected Object fetchDataFromXmlObjectByReflection(XmlObject xmlObject, String methodName)(Code) | | |
getMethodWithNoParametersByName | final protected Method getMethodWithNoParametersByName(Class theClass, String methodName)(Code) | | |
|
|