C# Class Fudge.Serialization.JavaTypeMappingStrategy

Provides a mapping from .net types to their equivalent Java class names.

To specify a type mapper other than the default, either set this in FudgeSerializer.TypeMappingStrategy or through FudgeContext.SetProperty using ContextProperties.TypeMappingStrategyProperty.

The following rules are used: Java package names are lower case The initial portion of a Java package name and a .net namespace may be different Nested classes are demarked with $ in Java but + in .net

Inheritance: Fudge.Serialization.DefaultTypeMappingStrategy
Show file Open project: OpenGamma/Fudge-CSharp

Public Methods

Method Description
GetName ( Type type ) : string
GetType ( string name ) : Type
JavaTypeMappingStrategy ( ) : System

Constructs a new JavaTypeMappingStrategy where the .net namespace maps directly onto the Java package.

JavaTypeMappingStrategy ( string dotNetPrefix, string javaPrefix ) : System

Constructs a new JavaTypeMappingStrategy, mapping between a given .net namespace prefix and Java package prefix.

Method Details

GetName() public method

public GetName ( Type type ) : string
type System.Type
return string

GetType() public method

public GetType ( string name ) : Type
name string
return System.Type

JavaTypeMappingStrategy() public method

Constructs a new JavaTypeMappingStrategy where the .net namespace maps directly onto the Java package.
public JavaTypeMappingStrategy ( ) : System
return System

JavaTypeMappingStrategy() public method

Constructs a new JavaTypeMappingStrategy, mapping between a given .net namespace prefix and Java package prefix.
public JavaTypeMappingStrategy ( string dotNetPrefix, string javaPrefix ) : System
dotNetPrefix string Initial portion of .net namespace that needs to be swapped with the Java equivalent.
javaPrefix string Initial portion of Java package name that needs to be swapped with the .net equivalent.
return System