org.fudgemsg.types
Interface FudgeTypeConverter<Primary,Secondary>

Type Parameters:
Primary - type to convert from (or Object to support any type
Secondary - type to convert to
All Known Implementing Classes:
IndicatorFieldTypeConverter, JavaMathBigDecimalFieldType, JavaUtilCalendarFieldType, JavaUtilDateFieldType, JavaUtilTimeZoneFieldType, JavaUtilUUIDFieldType, JSR310DateProviderFieldType, JSR310DateTimeProviderFieldType, JSR310InstantFieldType, JSR310InstantProviderFieldType, JSR310LocalDateFieldType, JSR310LocalDateTimeFieldType, JSR310LocalTimeFieldType, JSR310OffsetDateFieldType, JSR310OffsetDateTimeFieldType, JSR310OffsetTimeFieldType, JSR310TimeProviderFieldType, JSR310TimeZoneFieldType, PrimitiveFieldTypesConverter, SecondaryFieldType, SecondaryFieldTypeBase, StringFieldTypeConverter

public interface FudgeTypeConverter<Primary,Secondary>

Definition of an API for conversion of types. This is used for the primary to secondary type conversion within a FudgeTypeDictionary and also for some other standard Java types.


Method Summary
 boolean canConvertPrimary(Class<? extends Primary> clazz)
          Returns true if this converter can manipulate the requested class.
 Secondary primaryToSecondary(Primary object)
          Converts an object to the secondary type this converter supports.
 

Method Detail

canConvertPrimary

boolean canConvertPrimary(Class<? extends Primary> clazz)
Returns true if this converter can manipulate the requested class.

Parameters:
clazz - to query
Returns:
true if a call to primaryToSecondary(Primary) will succeed, false if it would fail

primaryToSecondary

Secondary primaryToSecondary(Primary object)
Converts an object to the secondary type this converter supports.

Parameters:
object - to convert
Returns:
the converted object


Copyright 2009-Present by OpenGamma Inc. and individual contributors
Released under the Apache License, Version 2.0