Skip navigation links
JNA API 4.5.1
com.sun.jna.platform.win32.COM.util

Class Convert



  • class Convert
    extends java.lang.Object
    This class is considered internal to the package.
    • Constructor Summary

      Constructors 
      Constructor and Description
      Convert() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      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>
      T
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Convert

        Convert()
    • Method Detail

      • toVariant

        public static Variant.VARIANT toVariant(java.lang.Object value)
        Convert a java value into a VARIANT suitable for passing in a COM invocation.

        Implementation notes

        Parameters:
        value - to be wrapped
        Returns:
        wrapped VARIANT
      • toJavaObject

        public static java.lang.Object toJavaObject(Variant.VARIANT value,
                                                    java.lang.Class<?> targetClass,
                                                    ObjectFactory factory,
                                                    boolean addReference,
                                                    boolean freeValue)
      • toComEnum

        public static <T extends IComEnum> T toComEnum(java.lang.Class<T> enumType,
                                                       java.lang.Object value)
      • free

        public 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
      • free

        public 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
JNA API 4.5.1

Copyright © 2007-2017 Timothy Wall. All Rights Reserved.