flex.messaging.io
Interface TypeMarshaller

All Known Implementing Classes:
ASTranslator

public interface TypeMarshaller

A utility to convert between data types, useful for mapping loosely typed client classes to more strongly typed server classes.


Method Summary
 Object convert(Object source, Class desiredClass)
          Converts the supplied source instance to an instance of the desired Class.
 Object createInstance(Object source, Class desiredClass)
          Creates an instance of the desired class without populating the type.
 

Method Detail

createInstance

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

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

Object convert(Object source,
               Class desiredClass)
Converts the supplied source instance to an instance of the desired Class.

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/TypeMarshaller.html