JNF files are formatted like standard .ini files. For a given native type, OriginalTypeName, with associated GUID, G, jactivex will search section [G] in the JNF file for the following key/value pairs:
UseClassTypeName must be a fully-qualified Java type name in dotted form (for example, com.ms.wfc.ax.IFont).
If the Use Class key is defined, jactivex will replace all occurrences of type OriginalTypeName with UseClassTypeName. Furthermore, jactivex will generally not generate a Java wrapper for OriginalTypeName. Realistically, this keeps jactivex from using a generated type (for example, stdole2.IFont) when you would rather use your own standard type (for example, com.ms.wfc.ax.IFont).
NewTypeName must be a fully-qualified Java type name in dotted form (for example, com.ms.wfc.ui.Font) and both OldToNewConversionMethod and NewToOldConversionMethod must be fully-qualified Java method names in dotted form (for example, com.ms.wfc.ui.AxHost.getIFontFromFont and com.ms.wfc.ui.AxHost.getIFontFromFont).
Jactivex uses the information given by this key only when generating a coclass wrapper. Let OldClassName be UseClassTypeName if the Use Class key is present; otherwise, it should be OriginalTypeName. This key specifies that objects of type OldClassName should be converted to and from NewTypeName, using methods OldToNewConversionMethod and NewToOldConversionMethod.
The specified conversion methods must have the following signatures:
NewTypeName OldToNewConversionMethod( OldTypeName obj )
OldTypeName NewToOldConversionMethod( NewTypeName obj )
Currently, the only defined property is editable. If specified, jactivex will consider the type OriginalTypeName as editable. This is important: in generated WFC wrappers, PropertyInfo's are created only for properties of an editable type (primitive types, strings, and anything marked with this new editable property).
The following is a sample JNF file:
; this section is for IFont. [{bef6e002-a874-101a-8bba-00aa00300cab}] Use Class=com.ms.wfc.ax.IFont Conversion Info=com.ms.wfc.ui.Font,com.ms.wfc.ui.AxHost.getFontFromIFont,com.ms.wfc.ui.AxHost.getIFontFromFont Properties=editable ; this section is for OLE_COLOR. ; notice the lack of the 'Use Class' key, since OLE_COLOR is really an int. [{66504301-BE0F-101a-8bbb-00aa00300cab}] Conversion Info=com.ms.wfc.ui.Color,com.ms.wfc.ui.AxHost.getOleColorFromColor,com.ms.wfc.ui.AxHost.getColorFromOleColor Properties=editable