| java.lang.Object org.w3c.tools.resources.upgrade.Attribute org.w3c.tools.resources.upgrade.ObjectAttribute
ObjectAttribute | public class ObjectAttribute extends Attribute (Code) | | A generic Object attribute.
This attribute is usefull for attributes that are:
- Have Object values.
- Need not be saved (have the DONTSAVE bit set).
|
Field Summary | |
protected Class | cls The class for values of this attribute. |
Method Summary | |
public boolean | checkValue(Object value) Check that a value is allowed for this attribute.
Parameters: value - The value to check. | final public int | getPickleLength(Object value) Get the number of bytes required to save that attribute value.
Parameters: The - value about to be pickled. | public void | pickle(DataOutputStream out, Object obj) The ObjectAttribute values can't be pickled. | public Object | unpickle(DataInputStream in) The ObjectAttribute values can't be unpickled. |
cls | protected Class cls(Code) | | The class for values of this attribute.
|
ObjectAttribute | public ObjectAttribute(String name, Class cls, Object def, Integer flags)(Code) | | Create a new ObjectAttribute instance.
Parameters: name - The name of the attribute. Parameters: cls - The class for this attribute values. Parameters: def - The default value for this attribute. Parameters: flags - The attribute flags. |
ObjectAttribute | public ObjectAttribute(String name, String cname, Object def, Integer flags)(Code) | | Create a new ObjectAttribute instance.
Parameters: name - The name of the attribute. Parameters: cname - The name class for this attribute values. Parameters: def - The default value for this attribute. Parameters: flags - The attribute flags. exception: RuntimeException - If we couldn't resolve the class name. |
checkValue | public boolean checkValue(Object value)(Code) | | Check that a value is allowed for this attribute.
Parameters: value - The value to check. A boolean true if value is allowed. |
getPickleLength | final public int getPickleLength(Object value)(Code) | | Get the number of bytes required to save that attribute value.
Parameters: The - value about to be pickled. The number of bytes needed to pickle that value. exception: RuntimeException - Always throw since ObjectAttribute can't be pickled. |
|
|