org.eigenbase.util
Class UtilTest.SerializableEnum
java.lang.Object
org.eigenbase.util14.Enum14.BasicValue
org.eigenbase.util14.Enum14.SerializableValue
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.
Foo
public static final UtilTest.SerializableEnum Foo
Bar
public static final UtilTest.SerializableEnum Bar
UtilTest.SerializableEnum
public UtilTest.SerializableEnum(String name,
int ordinal)
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