Class w3c.jigsaw.resources.ObjectAttribute
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.jigsaw.resources.ObjectAttribute

java.lang.Object
   |
   +----w3c.jigsaw.resources.Attribute
           |
           +----w3c.jigsaw.resources.ObjectAttribute

public class ObjectAttribute
extends Attribute
A generic Object attribute. This attribute is usefull for attributes that are:

Variable Index

 o cls
The class for values of this attribute.

Constructor Index

 o ObjectAttribute(String, Class, Object, int)
Create a new ObjectAttribute instance.
 o ObjectAttribute(String, String, Object, int)
Create a new ObjectAttribute instance.

Method Index

 o checkValue(Object)
Check that a value is allowed for this attribute.
 o pickle(DataOutputStream, Object)
The ObjectAttribute values can't be pickled.
 o unpickle(DataInputStream)
The ObjectAttribute values can't be unpickled.

Variables

 o cls
  protected Class cls
The class for values of this attribute.

Constructors

 o ObjectAttribute
  public ObjectAttribute(String name,
                         Class cls,
                         Object def,
                         int flags)
Create a new ObjectAttribute instance.
Parameters:
name - The name of the attribute.
cls - The class for this attribute values.
def - The default value for this attribute.
flags - The attribute flags.
 o ObjectAttribute
  public ObjectAttribute(String name,
                         String cname,
                         Object def,
                         int flags)
Create a new ObjectAttribute instance.
Parameters:
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.
Throws: RuntimeException
If we couldn't resolve the class name.

Methods

 o checkValue
  public boolean checkValue(Object value)
Check that a value is allowed for this attribute.
Parameters:
value - The value to check.
Returns:
A boolean true if value is allowed.
Overrides:
checkValue in class Attribute
 o pickle
  public void pickle(DataOutputStream out,
                     Object obj)
The ObjectAttribute values can't be pickled.
Overrides:
pickle in class Attribute
 o unpickle
  public Object unpickle(DataInputStream in)
The ObjectAttribute values can't be unpickled.
Overrides:
unpickle in class Attribute

All Packages  Class Hierarchy  This Package  Previous  Next  Index