jp.develop.common.util.amf.encoder
Class BeanEncoder
java.lang.Object
jp.develop.common.util.amf.encoder.BeanEncoder
- All Implemented Interfaces:
- IEncoder<Object>, IEncoder.IObjectEncoder<Object>
public class BeanEncoder
- extends Object
- implements IEncoder<Object>, IEncoder.IObjectEncoder<Object>
Implementation of IEncoder for writing Object using Java beans principle.
- Author:
- Waki Takeya
BeanEncoder
public BeanEncoder()
encode
public void encode(AmfEncoder encoder,
Object object)
throws IOException
- Encode to Action Message Format(AMF).
- Specified by:
encode
in interface IEncoder<Object>
- Parameters:
encoder
- AMF encoder.object
- Object to be encoded.
- Throws:
IOException
- I/O Exception.
getTraitsInfo
public TraitsInfo getTraitsInfo(Object object)
- Get object's traits information.
- Specified by:
getTraitsInfo
in interface IEncoder.IObjectEncoder<Object>
- Parameters:
object
- Target object.
- Returns:
- Traits information.
encodeProperties
public void encodeProperties(AmfEncoder encoder,
TraitsInfo traits,
Object object,
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<Object>
- Parameters:
encoder
- AMF encoder.traits
- Traits information.object
- Object to be encoded.
- Throws:
IOException
- I/O Exception.