Package org.wikipediacleaner.api.data

Examples of org.wikipediacleaner.api.data.LanguageRegistry$Variant


    }
  }

  private static Variant maybeCopyVariant(Variant variant) {
    if (variant == null) {
      return new Variant();
    }
    switch (variant.getType()) {
      case COM.VT_DISPATCH : {
        IDispatch dispatch = variant.getDispatch();
        dispatch.AddRef();
        return new Variant(dispatch);
      }
      case COM.VT_UNKNOWN : {
        IUnknown unknown = variant.getUnknown();
        unknown.AddRef();
        return new Variant(unknown);
      }
    }
    return variant;
  }
View Full Code Here


    IDispatch dispatch = variant.getDispatch();
    int[] ids = oleAutomationGetIdsOfNames(dispatch);
    if (ids == null) {
      return false;
    }
    Variant result = null;
    try {
      result = oleAutomationInvoke(dispatch, ids[0]);
      /*
       * If the return type of the valueOf method is string, we assume it is a
       * String wrapper object.
       */
      return result.getType() == COM.VT_BSTR;
    } finally {
      if (result != null) {
        result.dispose();
      }
    }
  }
View Full Code Here

   *
   * @see com.google.gwt.dev.shell.JsValue#setBoolean(boolean)
   */
  @Override
  public void setBoolean(boolean val) {
    setVariant(new Variant(val));
  }
View Full Code Here

   *
   * @see com.google.gwt.dev.shell.JsValue#setByte(byte)
   */
  @Override
  public void setByte(byte val) {
    setVariant(new Variant(val));
  }
View Full Code Here

   *
   * @see com.google.gwt.dev.shell.JsValue#setChar(char)
   */
  @Override
  public void setChar(char val) {
    setVariant(new Variant(val));
  }
View Full Code Here

   *
   * @see com.google.gwt.dev.shell.JsValue#setDouble(double)
   */
  @Override
  public void setDouble(double val) {
    setVariant(new Variant(val));
  }
View Full Code Here

   *
   * @see com.google.gwt.dev.shell.JsValue#setInt(int)
   */
  @Override
  public void setInt(int val) {
    setVariant(new Variant(val));
  }
View Full Code Here

   *
   * @see com.google.gwt.dev.shell.JsValue#setNull()
   */
  @Override
  public void setNull() {
    setVariant(new Variant(0, COM.VT_NULL));
  }
View Full Code Here

  /**
   * Method copied from 3.3+ Variant class.
   */
  public static Variant win32_new(int varArgAddr) {
    try {
      Variant variant = new Variant();
      Method setDataMethod =
          variant.getClass().getDeclaredMethod("setData", new Class[]{int.class});
      setDataMethod.setAccessible(true);
      setDataMethod.invoke(variant, new Object[]{new Integer(varArgAddr)});
      return variant;
    } catch (Throwable e) {
      throw new RuntimeException(e);
View Full Code Here

   *
   * @see com.google.gwt.dev.shell.JsValue#setShort(short)
   */
  @Override
  public void setShort(short val) {
    setVariant(new Variant(val));
  }
View Full Code Here

TOP

Related Classes of org.wikipediacleaner.api.data.LanguageRegistry$Variant

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.