| java.lang.Object org.w3c.tools.resources.Attribute
All known Subclasses: org.w3c.tools.resources.ObjectAttribute, org.w3c.tools.resources.SimpleAttribute, org.w3c.tools.resources.FrameArrayAttribute, org.w3c.tools.resources.ArrayAttribute,
Attribute | abstract public class Attribute implements Serializable(Code) | | Instances of this class describe an attribute of a resource.
|
Field Summary | |
final public static int | COMPUTED Flags value - This attribute is computed from the resource state. | final public static int | DONTSAVE Flag value - This attribute shouldn't be saved. | final public static int | EDITABLE Flag value - This attribute is editable. | final public static int | MANDATORY Flag value - This attribute is mandatory. | protected int | flags The associated flags (see the predefined flags). | protected String | name The attribute name. | protected String | type The attribute's value type, as the name of its class. |
Constructor Summary | |
public | Attribute(String name, Object def, int flags) Private constructore to create a new resource attribute description. | public | Attribute() |
Method Summary | |
public boolean | checkFlag(int tst) Check some flag on this attribute description. | abstract public boolean | checkValue(Object value) Is the provided object a suitable value for this attribute ?
If so, store it into the given store.
Parameters: value - The value to check. Parameters: store - The array to store the value to if succeed. Parameters: idx - The location in the above array. | public Object | getDefault() Get this attribute default value. | public String | getFlag() | public String | getName() Get this attribute name. | public String | getType() Get this attribute type. | public void | setFlag(String flag) | public void | setName(String name) set the attribute name. | abstract public String | stringify(Object value) |
COMPUTED | final public static int COMPUTED(Code) | | Flags value - This attribute is computed from the resource state.
|
DONTSAVE | final public static int DONTSAVE(Code) | | Flag value - This attribute shouldn't be saved.
|
EDITABLE | final public static int EDITABLE(Code) | | Flag value - This attribute is editable.
|
MANDATORY | final public static int MANDATORY(Code) | | Flag value - This attribute is mandatory.
|
flags | protected int flags(Code) | | The associated flags (see the predefined flags).
|
type | protected String type(Code) | | The attribute's value type, as the name of its class.
|
Attribute | public Attribute(String name, Object def, int flags)(Code) | | Private constructore to create a new resource attribute description.
Parameters: name - The name of the attribute. Parameters: def - Its default value. Parameters: flags - Its associated flags. |
Attribute | public Attribute()(Code) | | Empty contructor, (cls.newInstance())
|
checkFlag | public boolean checkFlag(int tst)(Code) | | Check some flag on this attribute description.
|
checkValue | abstract public boolean checkValue(Object value)(Code) | | Is the provided object a suitable value for this attribute ?
If so, store it into the given store.
Parameters: value - The value to check. Parameters: store - The array to store the value to if succeed. Parameters: idx - The location in the above array. A boolean true if this object can be usedas a value for this attribute. exception: IllegalAttributeAccess - If the provided value doesn't matchthe expected type. |
getDefault | public Object getDefault()(Code) | | Get this attribute default value.
A default value for this attribute (may benull). |
getName | public String getName()(Code) | | Get this attribute name.
A String giving the attribute name. |
getType | public String getType()(Code) | | Get this attribute type.
|
setName | public void setName(String name)(Code) | | set the attribute name.
Parameters: name - the attribute name. |
|
|