01: package com.jeta.forms.store.xml.parser;
02:
03: import com.jeta.forms.store.jml.dom.JMLAttributes;
04:
05: /**
06: * Handler for objects that can store their representation as a single string.
07: * These type of objects are stored as direct child nodes (text) of the
08: * associated property.
09: *
10: * For example, we can store color objects this way:
11: *
12: * <at name="foreground" object="color">0,255,255</at>
13: *
14: * @author Jeff Tassin
15: */
16: public abstract class InlineObjectHandler extends ObjectHandler {
17:
18: /**
19: * ObjectHandler ipmlementation
20: */
21: protected Object instantiateObject(JMLAttributes attribs)
22: throws InstantiationException, IllegalAccessException,
23: ClassNotFoundException {
24: throw new InstantiationException(
25: "This method should not be called for InlineObjectHandlers. Call instantiateObject(String prop) instead.");
26: }
27:
28: protected abstract Object instantiateObject(JMLAttributes attribs,
29: String value) throws InstantiationException,
30: IllegalAccessException, ClassNotFoundException;
31:
32: }
|