com.yworks.yfiles.server.graphml.support.reflection
Class TypeConverters

java.lang.Object
  extended bycom.yworks.yfiles.server.graphml.support.reflection.TypeConverters

public class TypeConverters
extends java.lang.Object

Manages the mapping of different class types to implementations of ITypeConverter for this Class type.

Per default, ITypeConverters for the primitive data types and their corresponding complex data types as well as for String are registered which can convert objects of these types to and from Strings.

See Also:
ITypeConverter

Method Summary
static ITypeConverter getTypeConverter(java.lang.Class theClass)
          An ITypeConverter for the given type is looked up and returned.
static void setTypeConverter(java.lang.Class forType, ITypeConverter converter)
          Sets an ITypeConverter for the given class type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getTypeConverter

public static ITypeConverter getTypeConverter(java.lang.Class theClass)
An ITypeConverter for the given type is looked up and returned. If no converter for this class type had been added via the setTypeConverter method before, null is returned.

Parameters:
theClass - The Class for which an ITypeConverter should be looked up.
Returns:
An ITypeConverter for the given class type or null if no such ITypeConverter can be found.
See Also:
ITypeConverter

setTypeConverter

public static void setTypeConverter(java.lang.Class forType,
                                    ITypeConverter converter)
Sets an ITypeConverter for the given class type.

Parameters:
forType - The Class which the given converter can handle.
converter - The ITypeConverter to handle objects of the given class


Copyright © 2000-2013 yWorks GmbH. All rights reserved