    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:

- Have Object values.
- Need not be saved (have the DONTSAVE bit set).

##

cls
  The class for values of this attribute.

##

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

##

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

##

cls

      protected Class cls

  The class for values of this attribute.

##

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.

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.

##

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

pickle

      public void pickle(DataOutputStream out,
                         Object obj)

  The ObjectAttribute values can't be pickled.
  Overrides:
    pickle in class Attribute

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