jp.develop.common.util.amf.encoder
Class EnumObjectEncoder
java.lang.Object
jp.develop.common.util.amf.encoder.EnumObjectEncoder
- All Implemented Interfaces:
- IEncoder<Enum<?>>, IEncoder.IObjectEncoder<Enum<?>>
public class EnumObjectEncoder
- extends Object
- implements IEncoder<Enum<?>>, IEncoder.IObjectEncoder<Enum<?>>
Implementation of IEncoder.IObjectEncoder for encoding Enum as Object.
- Author:
- Waki Takeya
- See Also:
IEncoder
,
IEncoder.IObjectEncoder
EnumObjectEncoder
public EnumObjectEncoder()
encode
public void encode(AmfEncoder encoder,
Enum<?> value)
throws IOException
- Encode to Action Message Format(AMF).
- Specified by:
encode
in interface IEncoder<Enum<?>>
- Parameters:
encoder
- AMF encoder.value
- Object to be encoded.
- Throws:
IOException
- I/O Exception.
getTraitsInfo
public TraitsInfo getTraitsInfo(Enum<?> value)
- Get object's traits information.
- Specified by:
getTraitsInfo
in interface IEncoder.IObjectEncoder<Enum<?>>
- Parameters:
value
- Target object.
- Returns:
- Traits information.
encodeProperties
public void encodeProperties(AmfEncoder encoder,
TraitsInfo traits,
Enum<?> value,
PathStack path)
throws IOException
- Encode properties by same order of traits's properties.
As for externalizable, it is just depended
- Specified by:
encodeProperties
in interface IEncoder.IObjectEncoder<Enum<?>>
- Parameters:
encoder
- AMF encoder.traits
- Traits information.value
- Object to be encoded.
- Throws:
IOException
- I/O Exception.