flex.messaging.io.amf.translator
Class ASTranslator

java.lang.Object
  extended by flex.messaging.io.amf.translator.ASTranslator
All Implemented Interfaces:
TypeMarshaller

public class ASTranslator
extends Object
implements TypeMarshaller

ASTranslator provides the ability to convert between ASObjects used by Flex and Java objects in your application.


Constructor Summary
ASTranslator()
           
 
Method Summary
 Object convert(Object source, Class desiredClass)
          Translate an object to another object of type class.
 Object createInstance(Object source, Class desiredClass)
          Creates an instance of the desired class without populating the type.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ASTranslator

public ASTranslator()
Method Detail

createInstance

public Object createInstance(Object source,
                             Class desiredClass)
Creates an instance of the desired class without populating the type.

Specified by:
createInstance in interface TypeMarshaller
Parameters:
source - The raw Object to be converted into an instance of the desired class.
desiredClass - The type to which the source needs to be converted.
Returns:
An instance of the desired class.

convert

public Object convert(Object source,
                      Class desiredClass)
Translate an object to another object of type class. obj types should be ASObject, Boolean, String, Double, Date, ArrayList

Specified by:
convert in interface TypeMarshaller
Parameters:
source - The source instance.
desiredClass - The type to which the source needs to be converted.
Returns:
The converted instance of the desired class.


Copyright © 2008 Adobe Systems Inc. All Rights Reserved.

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/blazeds/1/javadoc/flex/messaging/io/amf/translator/ASTranslator.html