org.eigenbase.util
Class UtilTest.SerializableEnum

java.lang.Object
  extended by org.eigenbase.util14.Enum14.BasicValue
      extended by org.eigenbase.util14.Enum14.SerializableValue
          extended by org.eigenbase.util.UtilTest.SerializableEnum
All Implemented Interfaces:
Serializable, Comparable, Enum14.Value
Enclosing class:
UtilTest

private static class UtilTest.SerializableEnum
extends Enum14.SerializableValue

Enumeration which serializes correctly.


Field Summary
static UtilTest.SerializableEnum Bar
           
static UtilTest.SerializableEnum Foo
           
 
Fields inherited from class org.eigenbase.util14.Enum14.SerializableValue
_ordinal
 
Constructor Summary
UtilTest.SerializableEnum(String name, int ordinal)
           
 
Method Summary
protected  Object readResolve()
          Subclass must implement this method to retrieve a matching instance based on the _ordinal deserialized by Enum14.SerializableValue.readObject(java.io.ObjectInputStream).
 
Methods inherited from class org.eigenbase.util14.Enum14.BasicValue
compareTo, equals, equals, getDescription, getName, getOrdinal, hashCode, toString, unexpected
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

Foo

public static final UtilTest.SerializableEnum Foo

Bar

public static final UtilTest.SerializableEnum Bar
Constructor Detail

UtilTest.SerializableEnum

public UtilTest.SerializableEnum(String name,
                                 int ordinal)
Method Detail

readResolve

protected Object readResolve()
                      throws ObjectStreamException
Description copied from class: Enum14.SerializableValue
Subclass must implement this method to retrieve a matching instance based on the _ordinal deserialized by Enum14.SerializableValue.readObject(java.io.ObjectInputStream). This would typically be an instance from the original enumeration. Current instance is the candidate object deserialized from the ObjectInputStream. It is incomplete, cannot be used as-is, and this method must return a valid replacement. For example,
return SqlTypeName.get(_ordinal);

Specified by:
readResolve in class Enum14.SerializableValue
Returns:
replacement instance that matches _ordinal
Throws:
ObjectStreamException