class Convert
extends java.lang.Object
Constructor and Description |
---|
Convert() |
Modifier and Type | Method and Description |
---|---|
static void |
free(Variant.VARIANT variant,
java.lang.Class<?> javaType)
Free the contents of the supplied VARIANT.
|
static void |
free(Variant.VARIANT variant,
java.lang.Object value)
Free the contents of the supplied VARIANT.
|
static <T extends IComEnum> |
toComEnum(java.lang.Class<T> enumType,
java.lang.Object value) |
static java.lang.Object |
toJavaObject(Variant.VARIANT value,
java.lang.Class<?> targetClass,
ObjectFactory factory,
boolean addReference,
boolean freeValue) |
static Variant.VARIANT |
toVariant(java.lang.Object value)
Convert a java value into a VARIANT suitable for passing in a COM
invocation.
|
public static Variant.VARIANT toVariant(java.lang.Object value)
Implementation notes
OleAuto.SysFreeString(com.sun.jna.platform.win32.WTypes.BSTR)
.value
- to be wrappedpublic static java.lang.Object toJavaObject(Variant.VARIANT value, java.lang.Class<?> targetClass, ObjectFactory factory, boolean addReference, boolean freeValue)
public static <T extends IComEnum> T toComEnum(java.lang.Class<T> enumType, java.lang.Object value)
public static void free(Variant.VARIANT variant, java.lang.Class<?> javaType)
This method is a companion to toVariant(java.lang.Object)
. Primary usage is to
free BSTRs contained in VARIANTs.
variant
- to be clearedjavaType
- type before/after conversionpublic static void free(Variant.VARIANT variant, java.lang.Object value)
This method is a companion to toVariant(java.lang.Object)
. Primary usage is to
free BSTRs contained in VARIANTs.
variant
- to be clearedvalue
- value before/after conversion