gov.nasa.arc.brahms.vm.api.convert
Interface IConverter

All Known Implementing Classes:
ArrayConverter, BeanConverter, CollectionConverter, CORBAEnumConverter, EnumConverter, MapConverter, NullConverter, PrimitiveTypeConverter

public interface IConverter

IConverter is the interface to an object that is able to convert data between a Java representation and a Brahms representation.

Version:
$Revision: 1.1 $ $Date: 2008/02/21 18:57:51 $ $Author: rvhoof $
Author:
Ron van Hoof

Method Summary
 java.lang.Object toBrahms(java.lang.Class<?> javaType, java.lang.Object javaValue, IType brahmsType, ConversionContext ctx)
          Converts the specified Java value into its matching Brahms value.
 java.lang.Object toJava(IType brahmsType, java.lang.Object brahmsValue, java.lang.Class<?> javaType, ConversionContext ctx)
          Converts the specified Brahms value into its matching Java value.
 

Method Detail

toJava

java.lang.Object toJava(IType brahmsType,
                        java.lang.Object brahmsValue,
                        java.lang.Class<?> javaType,
                        ConversionContext ctx)
                        throws ExternalException
Converts the specified Brahms value into its matching Java value.

Parameters:
brahmsType - the Brahms type of the value
brahmsValue - the Brahms value to convert
javaType - the Java type to convert the value to
ctx - the ConversionContext
Returns:
Object the converted Java value
Throws:
ExternalException - if there was a problem converting the value

toBrahms

java.lang.Object toBrahms(java.lang.Class<?> javaType,
                          java.lang.Object javaValue,
                          IType brahmsType,
                          ConversionContext ctx)
                          throws ExternalException
Converts the specified Java value into its matching Brahms value.

Parameters:
javaType - the java type of the value
javaValue - the java value to convert
brahmsType - the Brahms type to convert the value to
ctx - the ConversionContext
Returns:
Object the converted Brahms value
Throws:
ExternalException - if there was a problem converting the value


Copyright © 1997-2012 All Rights Reserved.