Class Convert
- java.lang.Object
- 
- com.sun.jna.platform.win32.COM.util.Convert
 
- 
 class Convert extends java.lang.ObjectThis class is considered internal to the package.
- 
- 
Constructor SummaryConstructors Constructor Description Convert()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static voidfree(Variant.VARIANT variant, java.lang.Class<?> javaType)Free the contents of the supplied VARIANT.static voidfree(Variant.VARIANT variant, java.lang.Object value)Free the contents of the supplied VARIANT.static <T extends IComEnum>
 TtoComEnum(java.lang.Class<T> enumType, java.lang.Object value)static java.lang.ObjecttoJavaObject(Variant.VARIANT value, java.lang.Class<?> targetClass, ObjectFactory factory, boolean addReference, boolean freeValue)static Variant.VARIANTtoVariant(java.lang.Object value)Convert a java value into a VARIANT suitable for passing in a COM invocation.
 
- 
- 
- 
Method Detail- 
toVariantpublic static Variant.VARIANT toVariant(java.lang.Object value) Convert a java value into a VARIANT suitable for passing in a COM invocation.Implementation notes - VARIANTs are not rewrapped, but passed through unmodified
- A string is wrapped into a BSTR, that is wrapped into the VARIANT.
 The string is allocated as native memory by the VARIANT constructor. The
 BSTR needs to be freed by
 OleAuto.SysFreeString(com.sun.jna.platform.win32.WTypes.BSTR).
 - Parameters:
- value- to be wrapped
- Returns:
- wrapped VARIANT
 
 - 
toJavaObjectpublic static java.lang.Object toJavaObject(Variant.VARIANT value, java.lang.Class<?> targetClass, ObjectFactory factory, boolean addReference, boolean freeValue) 
 - 
toComEnumpublic static <T extends IComEnum> T toComEnum(java.lang.Class<T> enumType, java.lang.Object value) 
 - 
freepublic static void free(Variant.VARIANT variant, java.lang.Class<?> javaType) Free the contents of the supplied VARIANT.This method is a companion to toVariant(java.lang.Object). Primary usage is to free BSTRs contained in VARIANTs.- Parameters:
- variant- to be cleared
- javaType- type before/after conversion
 
 - 
freepublic static void free(Variant.VARIANT variant, java.lang.Object value) Free the contents of the supplied VARIANT.This method is a companion to toVariant(java.lang.Object). Primary usage is to free BSTRs contained in VARIANTs.- Parameters:
- variant- to be cleared
- value- value before/after conversion
 
 
- 
 
-