|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.w3c.tools.resources.Attribute org.w3c.tools.resources.ObjectAttribute
public class ObjectAttribute
A generic Object attribute. This attribute is usefull for attributes that are:
Field Summary | |
---|---|
protected java.lang.Class |
cls
The class for values of this attribute. |
Fields inherited from class org.w3c.tools.resources.Attribute |
---|
COMPUTED, DONTSAVE, EDITABLE, flags, MANDATORY, name, type |
Constructor Summary | |
---|---|
ObjectAttribute(java.lang.String name,
java.lang.Class cls,
java.lang.Object def,
int flags)
Create a new ObjectAttribute instance. |
|
ObjectAttribute(java.lang.String name,
java.lang.String cname,
java.lang.Object def,
int flags)
Create a new ObjectAttribute instance. |
Method Summary | |
---|---|
boolean |
checkValue(java.lang.Object value)
Check that a value is allowed for this attribute. |
java.lang.String |
pickle(java.lang.Object obj)
Pickle an integer to the given output stream. |
java.lang.String |
stringify(java.lang.Object value)
|
java.lang.Object |
unpickle(java.lang.String value)
Unpickle an integer from the given input stream. |
Methods inherited from class org.w3c.tools.resources.Attribute |
---|
checkFlag, getDefault, getFlag, getName, getType, setFlag, setName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.Class cls
Constructor Detail |
---|
public ObjectAttribute(java.lang.String name, java.lang.Class cls, java.lang.Object def, int flags)
name
- The name of the attribute.cls
- The class for this attribute values.def
- The default value for this attribute.flags
- The attribute flags.public ObjectAttribute(java.lang.String name, java.lang.String cname, java.lang.Object def, int flags)
name
- The name of the attribute.cname
- The name class for this attribute values.def
- The default value for this attribute.flags
- The attribute flags.
java.lang.RuntimeException
- If we couldn't resolve the class name.Method Detail |
---|
public boolean checkValue(java.lang.Object value)
checkValue
in class Attribute
value
- The value to check.
public java.lang.String pickle(java.lang.Object obj)
obj
- The object to pickle.public java.lang.Object unpickle(java.lang.String value)
value
- the string representation of this integer
public java.lang.String stringify(java.lang.Object value)
stringify
in class Attribute
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |