Package com.sun.star.uno

Examples of com.sun.star.uno.Any


        // Initialise the out paramters - not used but prevents error in
        // UNO bridge
        aOutParamIndex[0] = new short[0];
        aOutParam[0] = new Object[0];

        Any result = new Any(new Type(Boolean.class), Boolean.TRUE);

        if (aFunctionName.equals("Creatable"))
        {
            try
            {
                String newName;

                if (aParams == null || aParams.length < 1 ||
                    AnyConverter.isString(aParams[0]) == false)
                {
                    String prompt = "Enter name for new Script";
                    String title = "Create Script";
                                                                               
                    // try to get a DialogFactory instance, if it fails
                    // just use a Swing JOptionPane to prompt for the name
                    try
                    {
                        DialogFactory dialogFactory =
                            DialogFactory.getDialogFactory();
                                                                               
                        newName = dialogFactory.showInputDialog(title, prompt);
                    }
                    catch (Exception e)
                    {
                        newName = JOptionPane.showInputDialog(null, prompt, title,
                            JOptionPane.QUESTION_MESSAGE);
                    }
                }
                else {
                    newName = (String) AnyConverter.toString(aParams[0]);
                }

                if ( newName == null || newName.equals(""))
                {
                    result =  new Any(new Type(Boolean.class), Boolean.FALSE);
                }
                else
                {
                    String source = new String(provider.getScriptEditor().getTemplate().getBytes());
                    String languageName = newName + "." + provider.getScriptEditor().getExtension();
                    String language = container.getLanguage();

                    ScriptEntry entry = new ScriptEntry( language, languageName, languageName, "", new HashMap() );

                    Parcel parcel = (Parcel)container.getByName( getName() );
                    ScriptMetaData data = new ScriptMetaData( parcel, entry, source );
                    parcel.insertByName( languageName, data );

                    ScriptBrowseNode sbn = new ScriptBrowseNode( provider, parcel, languageName );

          if(browsenodes==null)
          {
              LogUtils.DEBUG("browsenodes null!!");
              browsenodes = new ArrayList(4);
          }
                    browsenodes.add(sbn);
                                                                               
                    result = new Any(new Type(XBrowseNode.class), sbn);
                }
            }
            catch (Exception e)
            {
    LogUtils.DEBUG("ParcelBrowseNode[create] failed with: " + e );
                LogUtils.DEBUG( LogUtils.getTrace( e ) );
                result = new Any(new Type(Boolean.class), Boolean.FALSE);

                // throw new com.sun.star.reflection.InvocationTargetException(
                //     "Error creating script: " + e.getMessage());
            }
        }
        else if (aFunctionName.equals("Deletable"))
        {
            try
            {
                if ( container.deleteParcel(getName()) )
                {
                    result = new Any(new Type(Boolean.class), Boolean.TRUE);
                }
                else
                {
                    result = new Any(new Type(Boolean.class), Boolean.FALSE);
                }
            }
            catch (Exception e)
            {
                result =  new Any(new Type(Boolean.class), Boolean.FALSE);
                                                                               
                // throw new com.sun.star.reflection.InvocationTargetException(
                //     "Error deleting parcel: " + e.getMessage());
            }
        }
        else if (aFunctionName.equals("Renamable"))
        {
            String newName = null;
            try
            {

                if (aParams == null || aParams.length < 1 ||
                    AnyConverter.isString(aParams[0]) == false)
                {
                    String prompt = "Enter new name for Library";
                    String title = "Rename Library";
                                                                               
                    // try to get a DialogFactory instance, if it fails
                    // just use a Swing JOptionPane to prompt for the name
                    try
                    {
                        DialogFactory dialogFactory =
                            DialogFactory.getDialogFactory();
                                                                               
                        newName = dialogFactory.showInputDialog(title, prompt);
                    }
                    catch (Exception e)
                    {
                        newName = JOptionPane.showInputDialog(null, prompt, title,
                            JOptionPane.QUESTION_MESSAGE);
                    }
                }
                else {
                    newName = (String) AnyConverter.toString(aParams[0]);
                }
                container.renameParcel( getName(), newName );
                Parcel p = (Parcel)container.getByName( newName );
                if(browsenodes == null )
                {
                    getChildNodes();
                }
                ScriptBrowseNode[] childNodes = (ScriptBrowseNode[])browsenodes.toArray(new ScriptBrowseNode[0]);

                for ( int index = 0; index < childNodes.length; index++ )
                {
                    childNodes[ index ].updateURI( p );
                }
                result = new Any(new Type(XBrowseNode.class), this);
            }
            catch (Exception e)
            {
                result =  new Any(new Type(Boolean.class), Boolean.FALSE);

                // throw new com.sun.star.reflection.InvocationTargetException(
                //     "Error renaming parcel: " + e.getMessage());
            }
        }
View Full Code Here


    Object result = null;

    Object face = UnoRuntime.queryInterface(zInterface, _object);
    // the hell knows why, but empty interfaces a given back as void anys
    if(face != null)
      result = new Any(type, face);
    return result;
  }
View Full Code Here

        // BOOLEAN:
        success &= testMapAny(transport, Boolean.FALSE, new CompareBoxed());
        success &= testMapAny(transport, Boolean.TRUE, new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(Type.BOOLEAN, Boolean.FALSE),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.BOOLEAN, Boolean.TRUE),
                              new CompareUnboxed());

        // BYTE:
        success &= testMapAny(transport, new Byte((byte) -128),
                              new CompareBoxed());
        success &= testMapAny(transport, new Byte((byte) 0),
                              new CompareBoxed());
        success &= testMapAny(transport, new Byte((byte) 127),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(Type.BYTE, new Byte((byte) -128)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.BYTE, new Byte((byte) 0)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.BYTE, new Byte((byte) 127)),
                              new CompareUnboxed());

        // SHORT:
        success &= testMapAny(transport, new Short((short) -32768),
                              new CompareBoxed());
        success &= testMapAny(transport, new Short((short) 0),
                              new CompareBoxed());
        success &= testMapAny(transport, new Short((short) 32767),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(Type.SHORT,
                                      new Short((short) -32768)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.SHORT, new Short((short) 0)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.SHORT, new Short((short) 32767)),
                              new CompareUnboxed());

        // UNSIGNED SHORT:
        success &= testMapAny(transport,
                              new Any(Type.UNSIGNED_SHORT,
                                      new Short((short) 0)),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(Type.UNSIGNED_SHORT,
                                      new Short((short) -32768)),
                              new CompareBoxed());

        // LONG:
        success &= testMapAny(transport, new Integer(-2147483648),
                              new CompareBoxed());
        success &= testMapAny(transport, new Integer(0),
                              new CompareBoxed());
        success &= testMapAny(transport, new Integer(2147483647),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(Type.LONG, new Integer(-2147483648)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.LONG, new Integer(0)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.LONG, new Integer(2147483647)),
                              new CompareUnboxed());

        // UNSIGNED LONG:
        success &= testMapAny(transport,
                              new Any(Type.UNSIGNED_LONG, new Integer(0)),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(Type.UNSIGNED_LONG,
                                      new Integer(-2147483648)),
                              new CompareBoxed());

        // HYPER:
        success &= testMapAny(transport, new Long(-9223372036854775808L),
                              new CompareBoxed());
        success &= testMapAny(transport, new Long(0L), new CompareBoxed());
        success &= testMapAny(transport, new Long(9223372036854775807L),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(Type.HYPER,
                                      new Long(-9223372036854775808L)),
                              new CompareUnboxed());
        success &= testMapAny(transport, new Any(Type.HYPER, new Long(0L)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.HYPER,
                                      new Long(9223372036854775807L)),
                              new CompareUnboxed());

        // UNSIGNED HYPER:
        success &= testMapAny(transport,
                              new Any(Type.UNSIGNED_HYPER, new Long(0L)),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(Type.UNSIGNED_HYPER,
                                      new Long(-9223372036854775808L)),
                              new CompareBoxed());

        // FLOAT:
        success &= testMapAny(transport, new Float(Float.NEGATIVE_INFINITY),
                              new CompareBoxed());
        success &= testMapAny(transport, new Float(Float.MIN_VALUE),
                              new CompareBoxed());
        success &= testMapAny(transport, new Float(-0.0f),
                              new CompareBoxed());
        success &= testMapAny(transport, new Float(0.0f),
                              new CompareBoxed());
        success &= testMapAny(transport, new Float(Float.MAX_VALUE),
                              new CompareBoxed());
        success &= testMapAny(transport, new Float(Float.POSITIVE_INFINITY),
                              new CompareBoxed());
        success &= testMapAny(transport, new Float(Float.NaN),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(Type.FLOAT,
                                      new Float(Float.NEGATIVE_INFINITY)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.FLOAT,
                                      new Float(Float.MIN_VALUE)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.FLOAT, new Float(-0.0f)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.FLOAT, new Float(0.0f)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.FLOAT,
                                      new Float(Float.MAX_VALUE)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.FLOAT,
                                      new Float(Float.POSITIVE_INFINITY)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.FLOAT, new Float(Float.NaN)),
                              new CompareUnboxed());

        // DOUBLE:
        success &= testMapAny(transport,
                              new Double(Double.NEGATIVE_INFINITY),
                              new CompareBoxed());
        success &= testMapAny(transport, new Double(Double.MIN_VALUE),
                              new CompareBoxed());
        success &= testMapAny(transport, new Double(-0.0f),
                              new CompareBoxed());
        success &= testMapAny(transport, new Double(0.0f),
                              new CompareBoxed());
        success &= testMapAny(transport, new Double(Double.MAX_VALUE),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Double(Double.POSITIVE_INFINITY),
                              new CompareBoxed());
        success &= testMapAny(transport, new Double(Double.NaN),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(Type.DOUBLE,
                                      new Double(Double.NEGATIVE_INFINITY)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.DOUBLE,
                                      new Double(Double.MIN_VALUE)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.DOUBLE, new Double(-0.0)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.DOUBLE, new Double(0.0)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.DOUBLE,
                                      new Double(Double.MAX_VALUE)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.DOUBLE,
                                      new Double(Double.POSITIVE_INFINITY)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.DOUBLE, new Double(Double.NaN)),
                              new CompareUnboxed());

        // CHAR:
        success &= testMapAny(transport, new Character('\u0000'),
                              new CompareBoxed());
        success &= testMapAny(transport, new Character('\uDBFF'),
                              new CompareBoxed());
        success &= testMapAny(transport, new Character('\uFFFD'),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(Type.CHAR, new Character('\u0000')),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.CHAR, new Character('\uDBFF')),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.CHAR, new Character('\uFFFD')),
                              new CompareUnboxed());

        // STRING:
        success &= testMapAny(transport, "", new CompareBoxed());
        success &= testMapAny(transport, "\uD800\uDC00",
                              new CompareBoxed());
        success &= testMapAny(transport, "Test", new CompareBoxed());
        success &= testMapAny(transport, new Any(Type.STRING, ""),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.STRING, "\uD800\uDC00"),
                              new CompareUnboxed());
        success &= testMapAny(transport, new Any(Type.STRING, "Test"),
                              new CompareUnboxed());

        // TYPE:
        success &= testMapAny(transport, Type.VOID, new CompareBoxed());
        success &= testMapAny(transport, Type.BOOLEAN, new CompareBoxed());
        success &= testMapAny(transport, Type.BYTE, new CompareBoxed());
        success &= testMapAny(transport, Type.SHORT, new CompareBoxed());
        success &= testMapAny(transport, Type.UNSIGNED_SHORT,
                              new CompareBoxed());
        success &= testMapAny(transport, Type.LONG, new CompareBoxed());
        success &= testMapAny(transport, Type.UNSIGNED_LONG,
                              new CompareBoxed());
        success &= testMapAny(transport, Type.HYPER, new CompareBoxed());
        success &= testMapAny(transport, Type.UNSIGNED_HYPER,
                              new CompareBoxed());
        success &= testMapAny(transport, Type.FLOAT, new CompareBoxed());
        success &= testMapAny(transport, Type.DOUBLE, new CompareBoxed());
        success &= testMapAny(transport, Type.CHAR, new CompareBoxed());
        success &= testMapAny(transport, Type.STRING, new CompareBoxed());
        success &= testMapAny(transport, Type.TYPE, new CompareBoxed());
        success &= testMapAny(transport, Type.ANY, new CompareBoxed());
        success &= testMapAny(transport,
                              new Type("[]boolean", TypeClass.SEQUENCE),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Type("[]byte", TypeClass.SEQUENCE),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Type("[]short", TypeClass.SEQUENCE),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Type("[]unsigned short",
                                       TypeClass.SEQUENCE),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Type("[]long", TypeClass.SEQUENCE),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Type("[]unsigned long",
                                       TypeClass.SEQUENCE),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Type("[]hyper", TypeClass.SEQUENCE),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Type("[]unsigned hyper",
                                       TypeClass.SEQUENCE),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Type("[]float", TypeClass.SEQUENCE),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Type("[]double", TypeClass.SEQUENCE),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Type("[]char", TypeClass.SEQUENCE),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Type("[]string", TypeClass.SEQUENCE),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Type("[]type", TypeClass.SEQUENCE),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Type("[]any", TypeClass.SEQUENCE),
                              new CompareBoxed());
        if (createTypes) {
            success &= testMapAny(transport,
                                  new Type("[]" + Enum1.class.getName(),
                                           TypeClass.SEQUENCE),
                                  new CompareBoxed());
            success &= testMapAny(transport,
                                  new Type("[]" + BaseStruct.class.getName(),
                                           TypeClass.SEQUENCE),
                                  new CompareBoxed());
            success &= testMapAny(transport,
                                  new Type("[]" + DerivedStruct.class.getName(),
                                           TypeClass.SEQUENCE),
                                  new CompareBoxed());
        }
        success &= testMapAny(transport,
                              new Type("[]" + XInterface.class.getName(),
                                       TypeClass.SEQUENCE),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Type("[]" + BaseInterface.class.getName(),
                                       TypeClass.SEQUENCE),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Type("[]"
                                       + DerivedInterface.class.getName(),
                                       TypeClass.SEQUENCE),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Type("[][]boolean", TypeClass.SEQUENCE),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Type("[][]byte", TypeClass.SEQUENCE),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Type("[][]short", TypeClass.SEQUENCE),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Type("[][]unsigned short",
                                       TypeClass.SEQUENCE),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Type("[][]long", TypeClass.SEQUENCE),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Type("[][]unsigned long",
                                       TypeClass.SEQUENCE),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Type("[][]hyper", TypeClass.SEQUENCE),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Type("[][]unsigned hyper",
                                       TypeClass.SEQUENCE),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Type("[][]float", TypeClass.SEQUENCE),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Type("[][]double", TypeClass.SEQUENCE),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Type("[][]char", TypeClass.SEQUENCE),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Type("[][]string", TypeClass.SEQUENCE),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Type("[][]type", TypeClass.SEQUENCE),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Type("[][]any", TypeClass.SEQUENCE),
                              new CompareBoxed());
        if (createTypes) {
            success &= testMapAny(transport,
                                  new Type("[][]" + Enum1.class.getName(),
                                           TypeClass.SEQUENCE),
                                  new CompareBoxed());
            success &= testMapAny(transport,
                                  new Type("[][]" + BaseStruct.class.getName(),
                                           TypeClass.SEQUENCE),
                                  new CompareBoxed());
            success &= testMapAny(transport,
                                  new Type("[][]"
                                           + DerivedStruct.class.getName(),
                                           TypeClass.SEQUENCE),
                                  new CompareBoxed());
        }
        success &= testMapAny(transport,
                              new Type("[][]" + XInterface.class.getName(),
                                       TypeClass.SEQUENCE),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Type("[][]"
                                       + BaseInterface.class.getName(),
                                       TypeClass.SEQUENCE),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Type("[][]"
                                       + DerivedInterface.class.getName(),
                                       TypeClass.SEQUENCE),
                              new CompareBoxed());
        if (createTypes) {
            success &= testMapAny(transport, new Type(Enum1.class.getName(),
                                                      TypeClass.ENUM),
                                  new CompareBoxed());
            success &= testMapAny(transport,
                                  new Type(BaseStruct.class.getName(),
                                           TypeClass.STRUCT),
                                  new CompareBoxed());
            success &= testMapAny(transport,
                                  new Type(DerivedStruct.class.getName(),
                                           TypeClass.STRUCT),
                                  new CompareBoxed());
        }
        success &= testMapAny(transport,
                              new Type(
                                  com.sun.star.uno.Exception.class.
                                  getName(),
                                  TypeClass.EXCEPTION),
                              new CompareBoxed());
        if (createTypes) {
            success &= testMapAny(transport,
                                  new Type(BaseException.class.getName(),
                                           TypeClass.EXCEPTION),
                                  new CompareBoxed());
            success &= testMapAny(transport,
                                  new Type(DerivedException.class.getName(),
                                           TypeClass.EXCEPTION),
                                  new CompareBoxed());
        }
        success &= testMapAny(transport,
                              new Type(
                                  com.sun.star.uno.RuntimeException.class.
                                  getName(),
                                  TypeClass.EXCEPTION),
                              new CompareBoxed());
        if (createTypes) {
            success &= testMapAny(transport,
                                  new Type(
                                      BaseRuntimeException.class.getName(),
                                      TypeClass.EXCEPTION),
                                  new CompareBoxed());
            success &= testMapAny(transport,
                                  new Type(
                                      DerivedRuntimeException.class.
                                      getName(),
                                      TypeClass.EXCEPTION),
                                  new CompareBoxed());
        }
        success &= testMapAny(transport,
                              new Type(XInterface.class.getName(),
                                       TypeClass.INTERFACE),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Type(BaseInterface.class.getName(),
                                       TypeClass.INTERFACE),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Type(DerivedInterface.class.getName(),
                                       TypeClass.INTERFACE),
                              new CompareBoxed());
        success &= testMapAny(transport, new Any(Type.TYPE, Type.VOID),
                              new CompareUnboxed());
        success &= testMapAny(transport, new Any(Type.TYPE, Type.BOOLEAN),
                              new CompareUnboxed());
        success &= testMapAny(transport, new Any(Type.TYPE, Type.BYTE),
                              new CompareUnboxed());
        success &= testMapAny(transport, new Any(Type.TYPE, Type.SHORT),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.TYPE, Type.UNSIGNED_SHORT),
                              new CompareUnboxed());
        success &= testMapAny(transport, new Any(Type.TYPE, Type.LONG),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.TYPE, Type.UNSIGNED_LONG),
                              new CompareUnboxed());
        success &= testMapAny(transport, new Any(Type.TYPE, Type.HYPER),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.TYPE, Type.UNSIGNED_HYPER),
                              new CompareUnboxed());
        success &= testMapAny(transport, new Any(Type.TYPE, Type.FLOAT),
                              new CompareUnboxed());
        success &= testMapAny(transport, new Any(Type.TYPE, Type.DOUBLE),
                              new CompareUnboxed());
        success &= testMapAny(transport, new Any(Type.TYPE, Type.CHAR),
                              new CompareUnboxed());
        success &= testMapAny(transport, new Any(Type.TYPE, Type.STRING),
                              new CompareUnboxed());
        success &= testMapAny(transport, new Any(Type.TYPE, Type.TYPE),
                              new CompareUnboxed());
        success &= testMapAny(transport, new Any(Type.TYPE, Type.ANY),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.TYPE,
                                      new Type("[]boolean",
                                               TypeClass.SEQUENCE)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.TYPE,
                                      new Type("[]byte",
                                               TypeClass.SEQUENCE)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.TYPE,
                                      new Type("[]short",
                                               TypeClass.SEQUENCE)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.TYPE,
                                      new Type("[]unsigned short",
                                               TypeClass.SEQUENCE)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.TYPE,
                                      new Type("[]long",
                                               TypeClass.SEQUENCE)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.TYPE,
                                      new Type("[]unsigned long",
                                               TypeClass.SEQUENCE)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.TYPE,
                                      new Type("[]hyper",
                                               TypeClass.SEQUENCE)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.TYPE,
                                      new Type("[]unsigned hyper",
                                               TypeClass.SEQUENCE)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.TYPE,
                                      new Type("[]float",
                                               TypeClass.SEQUENCE)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.TYPE,
                                      new Type("[]double",
                                               TypeClass.SEQUENCE)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.TYPE,
                                      new Type("[]char",
                                               TypeClass.SEQUENCE)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.TYPE,
                                      new Type("[]string",
                                               TypeClass.SEQUENCE)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.TYPE,
                                      new Type("[]type",
                                               TypeClass.SEQUENCE)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.TYPE,
                                      new Type("[]any",
                                               TypeClass.SEQUENCE)),
                              new CompareUnboxed());
        if (createTypes) {
            success &= testMapAny(transport,
                                  new Any(Type.TYPE,
                                          new Type("[]" + Enum1.class.getName(),
                                                   TypeClass.SEQUENCE)),
                                  new CompareUnboxed());
            success &= testMapAny(transport,
                                  new Any(Type.TYPE,
                                          new Type("[]"
                                                   + BaseStruct.class.getName(),
                                                   TypeClass.SEQUENCE)),
                                  new CompareUnboxed());
            success &= testMapAny(transport,
                                  new Any(Type.TYPE,
                                          new Type(
                                              "[]"
                                              + DerivedStruct.class.getName(),
                                              TypeClass.SEQUENCE)),
                                  new CompareUnboxed());
        }
        success &= testMapAny(transport,
                              new Any(Type.TYPE,
                                      new Type("[]"
                                               + XInterface.class.getName(),
                                               TypeClass.SEQUENCE)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.TYPE,
                                      new Type(
                                          "[]"
                                          + BaseInterface.class.getName(),
                                          TypeClass.SEQUENCE)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(
                                  Type.TYPE,
                                  new Type(
                                      "[]"
                                      + DerivedInterface.class.getName(),
                                      TypeClass.SEQUENCE)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.TYPE,
                                      new Type("[][]boolean",
                                               TypeClass.SEQUENCE)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.TYPE,
                                      new Type("[][]byte",
                                               TypeClass.SEQUENCE)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.TYPE,
                                      new Type("[][]short",
                                               TypeClass.SEQUENCE)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.TYPE,
                                      new Type("[][]unsigned short",
                                               TypeClass.SEQUENCE)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.TYPE,
                                      new Type("[][]long",
                                               TypeClass.SEQUENCE)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.TYPE,
                                      new Type("[][]unsigned long",
                                               TypeClass.SEQUENCE)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.TYPE,
                                      new Type("[][]hyper",
                                               TypeClass.SEQUENCE)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.TYPE,
                                      new Type("[][]unsigned hyper",
                                               TypeClass.SEQUENCE)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.TYPE,
                                      new Type("[][]float",
                                               TypeClass.SEQUENCE)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.TYPE,
                                      new Type("[][]double",
                                               TypeClass.SEQUENCE)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.TYPE,
                                      new Type("[][]char",
                                               TypeClass.SEQUENCE)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.TYPE,
                                      new Type("[][]string",
                                               TypeClass.SEQUENCE)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.TYPE,
                                      new Type("[][]type",
                                               TypeClass.SEQUENCE)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.TYPE,
                                      new Type("[][]any",
                                               TypeClass.SEQUENCE)),
                              new CompareUnboxed());
        if (createTypes) {
            success &= testMapAny(transport,
                                  new Any(Type.TYPE,
                                          new Type("[][]"
                                                   + Enum1.class.getName(),
                                                   TypeClass.SEQUENCE)),
                                  new CompareUnboxed());
            success &= testMapAny(transport,
                                  new Any(Type.TYPE,
                                          new Type("[][]"
                                                   + BaseStruct.class.getName(),
                                                   TypeClass.SEQUENCE)),
                                  new CompareUnboxed());
            success &= testMapAny(transport,
                                  new Any(Type.TYPE,
                                          new Type(
                                              "[][]"
                                              + DerivedStruct.class.getName(),
                                              TypeClass.SEQUENCE)),
                                  new CompareUnboxed());
        }
        success &= testMapAny(transport,
                              new Any(Type.TYPE,
                                      new Type("[][]"
                                               + XInterface.class.getName(),
                                               TypeClass.SEQUENCE)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.TYPE,
                                      new Type(
                                          "[][]"
                                          + BaseInterface.class.getName(),
                                          TypeClass.SEQUENCE)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(
                                  Type.TYPE,
                                  new Type(
                                      "[][]"
                                      + DerivedInterface.class.getName(),
                                      TypeClass.SEQUENCE)),
                              new CompareUnboxed());
        if (createTypes) {
            success &= testMapAny(transport,
                                  new Any(Type.TYPE,
                                          new Type(Enum1.class.getName(),
                                                   TypeClass.ENUM)),
                                  new CompareUnboxed());
            success &= testMapAny(transport,
                                  new Any(Type.TYPE,
                                          new Type(BaseStruct.class.getName(),
                                                   TypeClass.STRUCT)),
                                  new CompareUnboxed());
            success &= testMapAny(transport,
                                  new Any(Type.TYPE,
                                          new Type(
                                              DerivedStruct.class.getName(),
                                              TypeClass.STRUCT)),
                                  new CompareUnboxed());
        }
        success &= testMapAny(transport,
                              new Any(
                                  Type.TYPE,
                                  new Type(
                                      com.sun.star.uno.Exception.class.
                                      getName(),
                                      TypeClass.EXCEPTION)),
                              new CompareUnboxed());
        if (createTypes) {
            success &= testMapAny(transport,
                                  new Any(Type.TYPE,
                                          new Type(
                                              BaseException.class.getName(),
                                              TypeClass.EXCEPTION)),
                                  new CompareUnboxed());
            success &= testMapAny(transport,
                                  new Any(
                                      Type.TYPE,
                                      new Type(
                                          DerivedException.class.getName(),
                                          TypeClass.EXCEPTION)),
                                  new CompareUnboxed());
        }
        success &= testMapAny(transport,
                              new Any(
                                  Type.TYPE,
                                  new Type(
                                      com.sun.star.uno.RuntimeException.
                                      class.getName(),
                                      TypeClass.EXCEPTION)),
                              new CompareUnboxed());
        if (createTypes) {
            success &= testMapAny(transport,
                                  new Any(
                                      Type.TYPE,
                                      new Type(
                                          BaseRuntimeException.class.
                                          getName(),
                                          TypeClass.EXCEPTION)),
                                  new CompareUnboxed());
            success &= testMapAny(transport,
                                  new Any(
                                      Type.TYPE,
                                      new Type(
                                          DerivedRuntimeException.class.
                                          getName(),
                                          TypeClass.EXCEPTION)),
                                  new CompareUnboxed());
        }
        success &= testMapAny(transport,
                              new Any(Type.TYPE,
                                      new Type(XInterface.class.getName(),
                                               TypeClass.INTERFACE)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.TYPE,
                                      new Type(
                                          BaseInterface.class.getName(),
                                          TypeClass.INTERFACE)),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(Type.TYPE,
                                      new Type(
                                          DerivedInterface.class.getName(),
                                          TypeClass.INTERFACE)),
                              new CompareUnboxed());

        // Sequence Types:
        success &= testMapAny(transport, new boolean[] {},
                              new CompareBoxed());
        success &= testMapAny(transport, new boolean[] { false, true },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(new Type(boolean[].class),
                                      new boolean[] {}),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(new Type(boolean[].class),
                                      new boolean[] { false, true }),
                              new CompareUnboxed());
        success &= testMapAny(transport, new byte[] {},
                              new CompareBoxed());
        success &= testMapAny(transport, new byte[] { -128, 0, 127 },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(new Type(byte[].class),
                                      new byte[] {}),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(new Type(byte[].class),
                                      new byte[] { -128, 0, 127 }),
                              new CompareUnboxed());
        success &= testMapAny(transport, new short[] {},
                              new CompareBoxed());
        success &= testMapAny(transport, new short[] { -32768, 0, 32767 },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(new Type(short[].class),
                                      new short[] {}),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(new Type(short[].class),
                                      new short[] { -32768, 0, 32767 }),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(new Type("[]unsigned short",
                                               TypeClass.SEQUENCE),
                                      new short[] {}),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(new Type("[]unsigned short",
                                               TypeClass.SEQUENCE),
                                      new short[] { 0, -32768 }),
                              new CompareBoxed());
        success &= testMapAny(transport, new int[] {},
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new int[] { -2147483648, 0, 2147483647 },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(new Type(int[].class),
                                      new int[] {}),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(new Type(int[].class),
                                      new int[] { -2147483648, 0,
                                                  2147483647 }),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(new Type("[]unsigned long",
                                               TypeClass.SEQUENCE),
                                      new int[] {}),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(new Type("[]unsigned long",
                                               TypeClass.SEQUENCE),
                                      new int[] { 0, -2147483648 }),
                              new CompareBoxed());
        success &= testMapAny(transport, new long[] {},
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new long[] { -9223372036854775808L, 0L,
                                           9223372036854775807L },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(new Type(long[].class),
                                      new long[] {}),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(new Type(long[].class),
                                      new long[] { -9223372036854775808L,
                                                   0L,
                                                   9223372036854775807L }),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(new Type("[]unsigned hyper",
                                               TypeClass.SEQUENCE),
                                      new long[] {}),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(new Type("[]unsigned hyper",
                                               TypeClass.SEQUENCE),
                                      new long[] { 0L,
                                                   -9223372036854775808L }),
                              new CompareBoxed());
        success &= testMapAny(transport, new float[] {},
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new float[] { Float.NEGATIVE_INFINITY,
                                            Float.MIN_VALUE, -0.0f, 0.0f,
                                            Float.MAX_VALUE,
                                            Float.POSITIVE_INFINITY,
                                            Float.NaN },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(new Type(float[].class),
                                      new float[] {}),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(new Type(float[].class),
                                      new float[] { Float.NEGATIVE_INFINITY,
                                                    Float.MIN_VALUE, -0.0f,
                                                    0.0f, Float.MAX_VALUE,
                                                    Float.POSITIVE_INFINITY,
                                                    Float.NaN }),
                              new CompareUnboxed());
        success &= testMapAny(transport, new double[] {},
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new double[] { Double.NEGATIVE_INFINITY,
                                             Double.MIN_VALUE, -0.0, 0.0,
                                             Double.MAX_VALUE,
                                             Double.POSITIVE_INFINITY,
                                             Double.NaN },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(new Type(double[].class),
                                      new double[] {}),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(new Type(double[].class),
                                      new double[] {
                                          Double.NEGATIVE_INFINITY,
                                          Double.MIN_VALUE, -0.0, 0.0,
                                          Double.MAX_VALUE,
                                          Double.POSITIVE_INFINITY,
                                          Double.NaN }),
                              new CompareUnboxed());
        success &= testMapAny(transport, new char[] {},
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new char[] { '\u0000', '\uDBFF', '\uFFFD' },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(new Type(char[].class),
                                      new char[] {}),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(
                                  new Type(char[].class),
                                  new char[] { '\u0000', '\uDBFF',
                                               '\uFFFD' }),
                              new CompareUnboxed());
        success &= testMapAny(transport, new String[] {},
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new String[] { "", "\uD800\uDC00", "Test" },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(new Type(String[].class),
                                      new String[] {}),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(new Type(String[].class),
                                      new String[] { "", "\uD800\uDC00",
                                                     "Test" }),
                              new CompareUnboxed());
        success &= testMapAny(transport, new Type[] {}, new CompareBoxed());
        success &= testMapAny(transport,
                              new Type[] {
                                  Type.VOID,
                                  new Type(DerivedInterface.class.getName(),
                                           TypeClass.INTERFACE) },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(new Type(Type[].class),
                                      new Type[] {}),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(
                                  new Type(Type[].class),
                                  new Type[] {
                                      Type.VOID,
                                      new Type(
                                          DerivedInterface.class.getName(),
                                          TypeClass.INTERFACE) }),
                              new CompareUnboxed());
        success &= testMapAny(transport, new Object[] {},
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Object[] { Any.VOID, Boolean.FALSE },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Object[] {
                                  Boolean.FALSE,
                                  new Any(Type.BOOLEAN, Boolean.TRUE) },
                              new CompareBoxed(true));
        success &= testMapAny(transport,
                              new Any(new Type(Any[].class),
                                      new Object[] {}),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(new Type(Any[].class),
                                      new Object[] { Any.VOID,
                                                     Boolean.FALSE }),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(new Type(Any[].class),
                                      new Object[] {
                                          Boolean.FALSE,
                                          new Any(Type.BOOLEAN,
                                                  Boolean.TRUE) }),
                              new CompareUnboxed(true));
        success &= testMapAny(transport, new Any[] {},
                              new CompareSpecific(new Object[] {}));
        success &= testMapAny(transport,
                              new Any[] { Any.VOID,
                                          new Any(Type.BOOLEAN,
                                                  Boolean.TRUE) },
                              new CompareSpecific(
                                  new Object[] { Any.VOID, Boolean.TRUE }));
        success &= testMapAny(transport,
                              new Any(new Type(Any[].class), new Any[] {}),
                              new CompareSpecific(new Object[] {}));
        success &= testMapAny(transport,
                              new Any(new Type(Any[].class),
                                      new Any[] { Any.VOID,
                                                  new Any(Type.BOOLEAN,
                                                          Boolean.TRUE) }),
                              new CompareSpecific(
                                  new Object[] { Any.VOID, Boolean.TRUE }));
        success &= testMapAny(transport,
                              new Any(new Type(Any[].class),
                                      new Boolean[] {}),
                              new CompareSpecific(new Object[] {}));
        success &= testMapAny(transport,
                              new Any(new Type(Any[].class),
                                      new Boolean[] { Boolean.FALSE }),
                              new CompareSpecific(
                                  new Object[] { Boolean.FALSE }));
        if (createTypes) {
            success &= testMapAny(transport, new Enum1[] {},
                                  new CompareBoxed());
            success &= testMapAny(transport, new Enum1[] { new Enum1(),
                                                           new Enum2() },
                                  new CompareSpecific(
                                      new Enum1[] { new Enum1(),
                                                    new Enum1() }));
            success &= testMapAny(transport,
                                  new Any(new Type(Enum1[].class),
                                          new Enum1[] {}),
                                  new CompareUnboxed());
            success &= testMapAny(transport,
                                  new Any(new Type(Enum1[].class),
                                          new Enum1[] { new Enum1(),
                                                        new Enum2() }),
                                  new CompareSpecific(
                                      new Enum1[] { new Enum1(),
                                                    new Enum1() }));
            success &= testMapAny(transport,
                                  new Any(new Type(Enum1[].class),
                                          new Enum2[] {}),
                                  new CompareSpecific(new Enum1[] {}));
            success &= testMapAny(transport,
                                  new Any(new Type(Enum1[].class),
                                          new Enum2[] { new Enum2() }),
                                  new CompareSpecific(
                                      new Enum1[] { new Enum1() }));
            success &= testMapAny(transport, new BaseStruct[] {},
                                  new CompareBoxed());
            success &= testMapAny(transport,
                                  new BaseStruct[] { new BaseStruct(),
                                                     new DerivedStruct() },
                                  new CompareSpecific(
                                      new BaseStruct[] { new BaseStruct(),
                                                         new BaseStruct() }));
            success &= testMapAny(transport,
                                  new Any(new Type(BaseStruct[].class),
                                          new BaseStruct[] {}),
                                  new CompareUnboxed());
            success &= testMapAny(transport,
                                  new Any(new Type(BaseStruct[].class),
                                          new BaseStruct[] {
                                              new BaseStruct(),
                                              new DerivedStruct() }),
                                  new CompareSpecific(
                                      new BaseStruct[] { new BaseStruct(),
                                                         new BaseStruct() }));
            success &= testMapAny(transport,
                                  new Any(new Type(BaseStruct[].class),
                                          new DerivedStruct[] {}),
                                  new CompareSpecific(new BaseStruct[] {}));
            success &= testMapAny(transport,
                                  new Any(new Type(BaseStruct[].class),
                                          new DerivedStruct[] {
                                              new DerivedStruct() }),
                                  new CompareSpecific(
                                      new BaseStruct[] { new BaseStruct() }));
            success &= testMapAny(transport, new DerivedStruct[] {},
                                  new CompareBoxed());
            success &= testMapAny(transport,
                                  new DerivedStruct[] { new DerivedStruct() },
                                  new CompareBoxed());
            success &= testMapAny(transport,
                                  new Any(new Type(DerivedStruct[].class),
                                          new DerivedStruct[] {}),
                                  new CompareUnboxed());
            success &= testMapAny(transport,
                                  new Any(new Type(DerivedStruct[].class),
                                          new DerivedStruct[] {
                                              new DerivedStruct() }),
                                  new CompareUnboxed());
        }
        success &= testMapAny(transport, new XInterface[] {},
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new XInterface[] {
                                  null, new XInterface() {},
                                  new BaseInterface() {},
                                  new DerivedInterface() {} },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(new Type(XInterface[].class),
                                      new XInterface[] {}),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(new Type(XInterface[].class),
                                      new XInterface[] {
                                          null, new XInterface() {},
                                          new BaseInterface() {},
                                          new DerivedInterface() {} }),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(new Type(XInterface[].class),
                                      new Object[] {}),
                              new CompareSpecific(new XInterface[] {}));
        {
            XInterface if1 = new XInterface() {};
            XInterface if2 = new BaseInterface() {};
            XInterface if3 = new DerivedInterface() {};
            success &= testMapAny(transport,
                                  new Any(new Type(XInterface[].class),
                                          new Object[] { null, if1, if2,
                                                         if3 }),
                                  new CompareSpecific(
                                      new XInterface[] { null, if1, if2,
                                                         if3 }));
        }
        success &= testMapAny(transport,
                              new Any(new Type(XInterface[].class),
                                      new BaseInterface[] {}),
                              new CompareSpecific(new XInterface[] {}));
        {
            BaseInterface if1 = new BaseInterface() {};
            BaseInterface if2 = new DerivedInterface() {};
            success &= testMapAny(transport,
                                  new Any(new Type(XInterface[].class),
                                          new BaseInterface[] { null, if1,
                                                                if2 }),
                                  new CompareSpecific(
                                      new XInterface[] { null, if1, if2 }));
        }
        success &= testMapAny(transport,
                              new Any(new Type(XInterface[].class),
                                      new DerivedInterface[] {}),
                              new CompareSpecific(new XInterface[] {}));
        {
            DerivedInterface if1 = new DerivedInterface() {};
            success &= testMapAny(transport,
                                  new Any(new Type(XInterface[].class),
                                          new DerivedInterface[] { null,
                                                                   if1 }),
                                  new CompareSpecific(
                                      new XInterface[] { null, if1 }));
        }
        success &= testMapAny(transport, new BaseInterface[] {},
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new BaseInterface[] {
                                  null, new BaseInterface() {},
                                  new DerivedInterface() {} },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(new Type(BaseInterface[].class),
                                      new BaseInterface[] {}),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(new Type(BaseInterface[].class),
                                      new BaseInterface[] {
                                          null, new BaseInterface() {},
                                          new DerivedInterface() {} }),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(new Type(BaseInterface[].class),
                                      new DerivedInterface[] {}),
                              new CompareSpecific(new BaseInterface[] {}));
        {
            DerivedInterface if1 = new DerivedInterface() {};
            success &= testMapAny(transport,
                                  new Any(new Type(BaseInterface[].class),
                                          new DerivedInterface[] { null,
                                                                   if1 }),
                                  new CompareSpecific(
                                      new BaseInterface[] { null, if1 }));
        }
        success &= testMapAny(transport, new DerivedInterface[] {},
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new DerivedInterface[] {
                                  null, new DerivedInterface() {} },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(new Type(DerivedInterface[].class),
                                      new DerivedInterface[] {}),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(new Type(DerivedInterface[].class),
                                      new DerivedInterface[] {
                                          null,
                                          new DerivedInterface() {} }),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new boolean[][] { new boolean[] {} },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new boolean[][] {
                                  new boolean[] { false, true } },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(new Type(boolean[][].class),
                                      new boolean[][] { new boolean[] {} }),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(new Type(boolean[][].class),
                                      new boolean[][] {
                                          new boolean[] { false, true } }),
                              new CompareUnboxed());
        success &= testMapAny(transport, new byte[][] { new byte[] {} },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new byte[][] { new byte[] { -128, 0, 127 } },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(new Type(byte[][].class),
                                      new byte[][] { new byte[] {} }),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(new Type(byte[][].class),
                                      new byte[][] {
                                          new byte[] { -128, 0, 127 } }),
                              new CompareUnboxed());
        success &= testMapAny(transport, new short[][] { new short[] {} },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new short[][] {
                                  new short[] { -32768, 0, 32767 } },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(new Type(short[][].class),
                                      new short[][] { new short[] {} }),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(new Type(short[][].class),
                                      new short[][] {
                                          new short[] { -32768, 0,
                                                        32767 } }),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(new Type("[][]unsigned short",
                                               TypeClass.SEQUENCE),
                                      new short[][] { new short[] {} }),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(new Type("[][]unsigned short",
                                               TypeClass.SEQUENCE),
                                      new short[][] {
                                          new short[] { 0, -32768 } }),
                              new CompareBoxed());
        success &= testMapAny(transport, new int[][] { new int[] {} },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new int[][] { new int[] { -2147483648, 0,
                                                        2147483647 } },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(new Type(int[][].class),
                                      new int[][] { new int[] {} }),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(new Type(int[][].class),
                                      new int[][] {
                                          new int[] { -2147483648, 0,
                                                      2147483647 } }),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(new Type("[][]unsigned long",
                                               TypeClass.SEQUENCE),
                                      new int[][] { new int[] {} }),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(new Type("[][]unsigned long",
                                               TypeClass.SEQUENCE),
                                      new int[][] {
                                          new int[] { 0, -2147483648 } }),
                              new CompareBoxed());
        success &= testMapAny(transport, new long[][] { new long[] {} },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new long[][] {
                                  new long[] { -9223372036854775808L, 0L,
                                               9223372036854775807L } },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(new Type(long[][].class),
                                      new long[][] { new long[] {} }),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(new Type(long[][].class),
                                      new long[][] {
                                          new long[] {
                                              -9223372036854775808L, 0L,
                                              9223372036854775807L } }),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(new Type("[][]unsigned hyper",
                                               TypeClass.SEQUENCE),
                                      new long[][] { new long[] {} }),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(new Type("[][]unsigned hyper",
                                               TypeClass.SEQUENCE),
                                      new long[][] {
                                          new long[] {
                                              0L,
                                              -9223372036854775808L } }),
                              new CompareBoxed());
        success &= testMapAny(transport, new float[][] { new float[] {} },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new float[][] {
                                  new float[] { Float.NEGATIVE_INFINITY,
                                                Float.MIN_VALUE, -0.0f,
                                                0.0f, Float.MAX_VALUE,
                                                Float.POSITIVE_INFINITY,
                                                Float.NaN } },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(new Type(float[][].class),
                                      new float[][] { new float[] {} }),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(new Type(float[][].class),
                                      new float[][] {
                                          new float[] {
                                              Float.NEGATIVE_INFINITY,
                                              Float.MIN_VALUE, -0.0f, 0.0f,
                                              Float.MAX_VALUE,
                                              Float.POSITIVE_INFINITY,
                                              Float.NaN } }),
                              new CompareUnboxed());
        success &= testMapAny(transport, new double[][] { new double[] {} },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new double[][] {
                                  new double[] { Double.NEGATIVE_INFINITY,
                                                 Double.MIN_VALUE, -0.0,
                                                 0.0, Double.MAX_VALUE,
                                                 Double.POSITIVE_INFINITY,
                                                 Double.NaN } },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(new Type(double[][].class),
                                      new double[][] { new double[] {} }),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(new Type(double[][].class),
                                      new double[][] {
                                          new double[] {
                                              Double.NEGATIVE_INFINITY,
                                              Double.MIN_VALUE, -0.0, 0.0,
                                              Double.MAX_VALUE,
                                              Double.POSITIVE_INFINITY,
                                              Double.NaN } }),
                              new CompareUnboxed());
        success &= testMapAny(transport, new char[][] { new char[] {} },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new char[][] {
                                  new char[] { '\u0000', '\uDBFF',
                                               '\uFFFD' } },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(new Type(char[][].class),
                                      new char[][] { new char[] {} }),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(
                                  new Type(char[][].class),
                                  new char[][] {
                                      new char[] { '\u0000', '\uDBFF',
                                                   '\uFFFD' } }),
                              new CompareUnboxed());
        success &= testMapAny(transport, new String[][] { new String[] {} },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new String[][] {
                                  new String[] { "", "\uD800\uDC00",
                                                 "Test" } },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(new Type(String[][].class),
                                      new String[][] { new String[] {} }),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(new Type(String[][].class),
                                      new String[][] {
                                          new String[] { "", "\uD800\uDC00",
                                                         "Test" } }),
                              new CompareUnboxed());
        success &= testMapAny(transport, new Type[][] { new Type[] {} },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Type[][] {
                                  new Type[] {
                                      Type.VOID,
                                      new Type(
                                          DerivedInterface.class.getName(),
                                          TypeClass.INTERFACE) } },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(new Type(Type[][].class),
                                      new Type[][] { new Type[] {} }),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(
                                  new Type(Type[][].class),
                                  new Type[][] {
                                      new Type[] {
                                          Type.VOID,
                                          new Type(
                                              DerivedInterface.class.
                                              getName(),
                                              TypeClass.INTERFACE) } }),
                              new CompareUnboxed());
        success &= testMapAny(transport, new Object[][] { new Object[] {} },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Object[][] {
                                  new Object[] { Any.VOID,
                                                 Boolean.FALSE } },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Object[][] {
                                  new Object[] {
                                      Boolean.FALSE,
                                      new Any(Type.BOOLEAN,
                                              Boolean.TRUE) } },
                              new CompareBoxed(true));
        success &= testMapAny(transport,
                              new Any(new Type(Any[][].class),
                                      new Object[][] { new Object[] {} }),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(new Type(Any[][].class),
                                      new Object[][] {
                                          new Object[] { Any.VOID,
                                                         Boolean.FALSE } }),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(new Type(Any[][].class),
                                      new Object[][] {
                                          new Object[] {
                                              Boolean.FALSE,
                                              new Any(Type.BOOLEAN,
                                                      Boolean.TRUE) } }),
                              new CompareUnboxed(true));
        success &= testMapAny(transport, new Any[][] { new Any[] {} },
                              new CompareSpecific(
                                  new Object[][] { new Object[] {} }));
        success &= testMapAny(transport,
                              new Any[][] {
                                  new Any[] { Any.VOID,
                                              new Any(Type.BOOLEAN,
                                                      Boolean.TRUE) } },
                              new CompareSpecific(
                                  new Object[][] {
                                      new Object[] { Any.VOID,
                                                     Boolean.TRUE } }));
        success &= testMapAny(transport,
                              new Any(new Type(Any[][].class),
                                      new Any[][] { new Any[] {} }),
                              new CompareSpecific(
                                  new Object[][] { new Object[] {} }));
        success &= testMapAny(transport,
                              new Any(new Type(Any[][].class),
                                      new Any[][] {
                                          new Any[] {
                                              Any.VOID,
                                              new Any(Type.BOOLEAN,
                                                      Boolean.TRUE) } }),
                              new CompareSpecific(
                                  new Object[][] {
                                      new Object[] { Any.VOID,
                                                     Boolean.TRUE } }));
        success &= testMapAny(transport,
                              new Any(new Type(Any[][].class),
                                      new Boolean[][] { new Boolean[] {} }),
                              new CompareSpecific(
                                  new Object[][] { new Object[] {} }));
        success &= testMapAny(transport,
                              new Any(new Type(Any[][].class),
                                      new Boolean[][] {
                                          new Boolean[] {
                                              Boolean.FALSE } }),
                              new CompareSpecific(
                                  new Object[][] {
                                      new Object[] { Boolean.FALSE } }));
        if (createTypes) {
            success &= testMapAny(transport, new Enum1[][] { new Enum1[] {} },
                                  new CompareBoxed());
            success &= testMapAny(transport,
                                  new Enum1[][] {
                                      new Enum1[] { new Enum1(),
                                                    new Enum2() } },
                                  new CompareSpecific(
                                      new Enum1[][] {
                                          new Enum1[] { new Enum1(),
                                                        new Enum1() } }));
            success &= testMapAny(transport,
                                  new Any(new Type(Enum1[][].class),
                                          new Enum1[][] { new Enum1[] {} }),
                                  new CompareUnboxed());
            success &= testMapAny(transport,
                                  new Any(new Type(Enum1[][].class),
                                          new Enum1[][] {
                                              new Enum1[] { new Enum1(),
                                                            new Enum2() } }),
                                  new CompareSpecific(
                                      new Enum1[][] {
                                          new Enum1[] { new Enum1(),
                                                        new Enum1() } }));
            success &= testMapAny(transport,
                                  new Any(new Type(Enum1[][].class),
                                          new Enum2[][] { new Enum2[] {} }),
                                  new CompareSpecific(
                                      new Enum1[][] { new Enum1[] {} }));
            success &= testMapAny(transport,
                                  new Any(new Type(Enum1[][].class),
                                          new Enum2[][] {
                                              new Enum2[] { new Enum2() } }),
                                  new CompareSpecific(
                                      new Enum1[][] {
                                          new Enum1[] { new Enum1() } }));
            success &= testMapAny(transport,
                                  new BaseStruct[][] { new BaseStruct[] {} },
                                  new CompareBoxed());
            success &= testMapAny(transport,
                                  new BaseStruct[][] {
                                      new BaseStruct[] {
                                          new BaseStruct(),
                                          new DerivedStruct() } },
                                  new CompareSpecific(
                                      new BaseStruct[][] {
                                          new BaseStruct[] {
                                              new BaseStruct(),
                                              new BaseStruct() } }));
            success &= testMapAny(transport,
                                  new Any(new Type(BaseStruct[][].class),
                                          new BaseStruct[][] {
                                              new BaseStruct[] {} }),
                                  new CompareUnboxed());
            success &= testMapAny(transport,
                                  new Any(new Type(BaseStruct[][].class),
                                          new BaseStruct[][] {
                                              new BaseStruct[] {
                                                  new BaseStruct(),
                                                  new DerivedStruct() } }),
                                  new CompareSpecific(
                                      new BaseStruct[][] {
                                          new BaseStruct[] {
                                              new BaseStruct(),
                                              new BaseStruct() } }));
            success &= testMapAny(transport,
                                  new Any(new Type(BaseStruct[][].class),
                                          new DerivedStruct[][] {
                                              new DerivedStruct[] {} }),
                                  new CompareSpecific(
                                      new BaseStruct[][] {
                                          new BaseStruct[] {} }));
            success &= testMapAny(transport,
                                  new Any(new Type(BaseStruct[][].class),
                                          new DerivedStruct[][] {
                                              new DerivedStruct[] {
                                                  new DerivedStruct() } }),
                                  new CompareSpecific(
                                      new BaseStruct[][] {
                                          new BaseStruct[] {
                                              new BaseStruct() } }));
            success &= testMapAny(transport,
                                  new DerivedStruct[][] {
                                      new DerivedStruct[] {} },
                                  new CompareBoxed());
            success &= testMapAny(transport,
                                  new DerivedStruct[][] {
                                      new DerivedStruct[] {
                                          new DerivedStruct() } },
                                  new CompareBoxed());
            success &= testMapAny(transport,
                                  new Any(new Type(DerivedStruct[][].class),
                                          new DerivedStruct[][] {
                                              new DerivedStruct[] {} }),
                                  new CompareUnboxed());
            success &= testMapAny(transport,
                                  new Any(new Type(DerivedStruct[][].class),
                                          new DerivedStruct[][] {
                                              new DerivedStruct[] {
                                                  new DerivedStruct() } }),
                                  new CompareUnboxed());
        }
        success &= testMapAny(transport,
                              new XInterface[][] { new XInterface[] {} },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new XInterface[][] {
                                  new XInterface[] {
                                      null, new XInterface() {},
                                      new BaseInterface() {},
                                      new DerivedInterface() {} } },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(new Type(XInterface[][].class),
                                      new XInterface[][] {
                                          new XInterface[] {} }),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(
                                  new Type(XInterface[][].class),
                                  new XInterface[][] {
                                      new XInterface[] {
                                          null, new XInterface() {},
                                          new BaseInterface() {},
                                          new DerivedInterface() {} } }),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(new Type(XInterface[][].class),
                                      new Object[][] { new Object[] {} }),
                              new CompareSpecific(
                                  new XInterface[][] {
                                      new XInterface[] {} }));
        {
            XInterface if1 = new XInterface() {};
            XInterface if2 = new BaseInterface() {};
            XInterface if3 = new DerivedInterface() {};
            success &= testMapAny(transport,
                                  new Any(new Type(XInterface[][].class),
                                          new Object[][] {
                                              new Object[] { null, if1, if2,
                                                             if3 } }),
                                  new CompareSpecific(
                                      new XInterface[][] {
                                          new XInterface[] { null, if1, if2,
                                                             if3 } }));
        }
        success &= testMapAny(transport,
                              new Any(new Type(XInterface[][].class),
                                      new BaseInterface[][] {
                                          new BaseInterface[] {} }),
                              new CompareSpecific(
                                  new XInterface[][] {
                                      new XInterface[] {} }));
        {
            BaseInterface if1 = new BaseInterface() {};
            BaseInterface if2 = new DerivedInterface() {};
            success &= testMapAny(transport,
                                  new Any(new Type(XInterface[][].class),
                                          new BaseInterface[][] {
                                              new BaseInterface[] {
                                                  null, if1, if2 } }),
                                  new CompareSpecific(
                                      new XInterface[][] {
                                          new XInterface[] {
                                              null, if1, if2 } }));
        }
        success &= testMapAny(transport,
                              new Any(new Type(XInterface[][].class),
                                      new DerivedInterface[][] {
                                          new DerivedInterface[] {} }),
                              new CompareSpecific(
                                  new XInterface[][] {
                                      new XInterface[] {} }));
        {
            DerivedInterface if1 = new DerivedInterface() {};
            success &= testMapAny(transport,
                                  new Any(new Type(XInterface[][].class),
                                          new DerivedInterface[][] {
                                              new DerivedInterface[] {
                                                  null, if1 } }),
                                  new CompareSpecific(
                                      new XInterface[][] {
                                          new XInterface[] {
                                              null, if1 } }));
        }
        success &= testMapAny(transport,
                              new BaseInterface[][] {
                                  new BaseInterface[] {} },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new BaseInterface[][] {
                                  new BaseInterface[] {
                                      null, new BaseInterface() {},
                                      new DerivedInterface() {} } },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(new Type(BaseInterface[][].class),
                                      new BaseInterface[][] {
                                          new BaseInterface[] {} }),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(
                                  new Type(BaseInterface[][].class),
                                  new BaseInterface[][] {
                                      new BaseInterface[] {
                                          null, new BaseInterface() {},
                                          new DerivedInterface() {} } }),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(new Type(BaseInterface[][].class),
                                      new DerivedInterface[][] {
                                          new DerivedInterface[] {} }),
                              new CompareSpecific(
                                  new BaseInterface[][] {
                                      new BaseInterface[] {} }));
        {
            DerivedInterface if1 = new DerivedInterface() {};
            success &= testMapAny(transport,
                                  new Any(new Type(BaseInterface[][].class),
                                          new DerivedInterface[][] {
                                              new DerivedInterface[] {
                                                  null, if1 } }),
                                  new CompareSpecific(
                                      new BaseInterface[][] {
                                          new BaseInterface[] {
                                              null, if1 } }));
        }
        success &= testMapAny(transport,
                              new DerivedInterface[][] {
                                  new DerivedInterface[] {} },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new DerivedInterface[][] {
                                  new DerivedInterface[] {
                                      null, new DerivedInterface() {} } },
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(new Type(DerivedInterface[][].class),
                                      new DerivedInterface[][] {
                                          new DerivedInterface[] {} }),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(
                                  new Type(DerivedInterface[][].class),
                                  new DerivedInterface[][] {
                                      new DerivedInterface[] {
                                          null,
                                          new DerivedInterface() {} } }),
                              new CompareUnboxed());

        // Enum Types:
        if (createTypes) {
            success &= testMapAny(transport, new Enum1(), new CompareBoxed());
            success &= testMapAny(transport, new Any(new Type(Enum1.class),
                                                     new Enum1()),
                                  new CompareUnboxed());
            success &= testMapAny(transport, new Any(new Type(Enum1.class),
                                                     new Enum2()),
                                  new CompareSpecific(new Enum1()));
        }

        // Struct Types:
        if (createTypes) {
            success &= testMapAny(transport, new BaseStruct(),
                                  new CompareBoxed());
            success &= testMapAny(transport,
                                  new Any(new Type(BaseStruct.class),
                                          new BaseStruct()),
                                  new CompareUnboxed());
            success &= testMapAny(transport,
                                  new Any(new Type(BaseStruct.class),
                                          new DerivedStruct()),
                                  new CompareSpecific(new BaseStruct()));
            success &= testMapAny(transport, new DerivedStruct(),
                                  new CompareBoxed());
            success &= testMapAny(transport,
                                  new Any(new Type(DerivedStruct.class),
                                          new DerivedStruct()),
                                  new CompareUnboxed());
        }

        // Exception Types:
        success &= testMapAny(transport, new com.sun.star.uno.Exception(),
                              new CompareClass(
                                  com.sun.star.uno.Exception.class));
        success &= testMapAny(transport,
                              new Any(new Type(
                                          com.sun.star.uno.Exception.class),
                                      new com.sun.star.uno.Exception()),
                              new CompareClass(
                                  com.sun.star.uno.Exception.class));
        success &= testMapAny(transport,
                              new Any(new Type(
                                          com.sun.star.uno.Exception.class),
                                      new BaseException()),
                              new CompareClass(
                                  com.sun.star.uno.Exception.class));
        success &= testMapAny(transport,
                              new Any(new Type(
                                          com.sun.star.uno.Exception.class),
                                      new DerivedException()),
                              new CompareClass(
                                  com.sun.star.uno.Exception.class));
        if (createTypes) {
            success &= testMapAny(transport, new BaseException(),
                                  new CompareBoxed());
            success &= testMapAny(transport,
                                  new Any(new Type(BaseException.class),
                                          new BaseException()),
                                  new CompareUnboxed());
            success &= testMapAny(transport,
                                  new Any(new Type(BaseException.class),
                                          new DerivedException()),
                                  new CompareSpecific(new BaseException()));
            success &= testMapAny(transport, new DerivedException(),
                                  new CompareBoxed());
            success &= testMapAny(transport,
                                  new Any(new Type(DerivedException.class),
                                          new DerivedException()),
                                  new CompareUnboxed());
        }
        success &= testMapAny(transport,
                              new com.sun.star.uno.RuntimeException(),
                              new CompareClass(
                                  com.sun.star.uno.RuntimeException.class));
        success &= testMapAny(transport,
                              new Any(
                                  new Type(
                                      com.sun.star.uno.RuntimeException.
                                      class),
                                  new com.sun.star.uno.RuntimeException()),
                              new CompareClass(
                                  com.sun.star.uno.RuntimeException.class));
        success &= testMapAny(transport,
                              new Any(
                                  new Type(
                                      com.sun.star.uno.RuntimeException.
                                      class),
                                  new BaseRuntimeException()),
                              new CompareClass(
                                  com.sun.star.uno.RuntimeException.class));
        success &= testMapAny(transport,
                              new Any(
                                  new Type(
                                      com.sun.star.uno.RuntimeException.
                                      class),
                                  new DerivedRuntimeException()),
                              new CompareClass(
                                  com.sun.star.uno.RuntimeException.class));
        if (createTypes) {
            success &= testMapAny(transport, new BaseRuntimeException(),
                                  new CompareBoxed());
            success &= testMapAny(transport,
                                  new Any(new Type(
                                              BaseRuntimeException.class),
                                          new BaseRuntimeException()),
                                  new CompareUnboxed());
            success &= testMapAny(transport,
                                  new Any(new Type(
                                              BaseRuntimeException.class),
                                          new DerivedRuntimeException()),
                                  new CompareSpecific(
                                      new BaseRuntimeException()));
            success &= testMapAny(transport, new DerivedRuntimeException(),
                                  new CompareBoxed());
            success &= testMapAny(transport,
                                  new Any(new Type(
                                              DerivedRuntimeException.class),
                                          new DerivedRuntimeException()),
                                  new CompareUnboxed());
        }

        // Interface Types:
        success &= testMapAny(transport, null, new CompareBoxed());
        success &= testMapAny(transport, new XInterface() {},
                              new CompareBoxed());
        success &= testMapAny(transport, new BaseInterface() {},
                              new CompareBoxed());
        success &= testMapAny(transport, new DerivedInterface() {},
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(new Type(XInterface.class), null),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(new Type(XInterface.class),
                                      new XInterface() {}),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(new Type(XInterface.class),
                                      new BaseInterface() {}),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(new Type(XInterface.class),
                                      new DerivedInterface() {}),
                              new CompareUnboxed());
        success &= testMapAny(transport,
                              new Any(new Type(BaseInterface.class), null),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(new Type(BaseInterface.class),
                                      new BaseInterface() {}),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(new Type(BaseInterface.class),
                                      new DerivedInterface() {}),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(new Type(DerivedInterface.class),
                                      null),
                              new CompareBoxed());
        success &= testMapAny(transport,
                              new Any(new Type(DerivedInterface.class),
                                      new DerivedInterface() {}),
                              new CompareBoxed());

        return success;
    }
View Full Code Here

    */
    protected Any getWrappedWindowHandle()
    {
               
        NamedValue window = new NamedValue(
            "WINDOW", new Any(new Type(Long.class), new Long(getNativeWindow())));
        NamedValue xembed = new NamedValue(
            "XEMBED", new Any(new Type(Boolean.class), new Boolean(false)));

        if (getNativeWindowSystemType() == SystemDependent.SYSTEM_XWINDOW )
        {
            String vendor = System.getProperty("java.vendor");
            if (vendor.equals("Sun Microsystems Inc.")
                && Boolean.valueOf(System.getProperty("sun.awt.xembedserver")).booleanValue())
            {
                xembed = new NamedValue(
                    "XEMBED",
                    new Any(new Type(Boolean.class), new Boolean(true)));
            }
        }
        return new Any(
            new Type("[]com.sun.star.beans.NamedValue"),
            new NamedValue[] {window, xembed});
    }
View Full Code Here

                UnoRuntime.queryInterface(XActiveDataSource.class,Writer);
            xADS.setOutputStream(xPipeOutput);
            XDocumentHandler handler = (XDocumentHandler)
                UnoRuntime.queryInterface(XDocumentHandler.class,Writer);

            Any arg = new Any(new Type(XDocumentHandler.class),handler);

            ret[0] = arg;
        } catch (com.sun.star.uno.Exception e) {
            e.printStackTrace();
        }
View Full Code Here

        String docType, String exportType, String fileURL)
        throws com.sun.star.uno.Exception {

        XDocumentHandler xDocHandWriter = XMLTools.getFileXMLWriter(xMSF, fileURL) ;

        Any arg = new Any(new Type(XDocumentHandler.class), xDocHandWriter);
        XInterface oExp = (XInterface)xMSF.createInstanceWithArguments(
            "com.sun.star.comp." + docType + ".XML" + exportType + "Exporter",
            new Object[] {arg});

        XExporter xExp = (XExporter) UnoRuntime.queryInterface
View Full Code Here

    private void writeAnyValue(Object value) {
        TypeDescription type;
        if (value == null || value instanceof XInterface) {
            type = TypeDescription.getTypeDescription(XInterface.class);
        } else if (value instanceof Any) {
            Any any = (Any) value;
            try {
                type = TypeDescription.getTypeDescription(any.getType());
            } catch (ClassNotFoundException e) {
                throw new RuntimeException(e.toString());
            }
            value = any.getObject();
        } else {
            type = TypeDescription.getTypeDescription(value.getClass());
        }
        writeType(type);
        writeValue(type, value);
View Full Code Here

        case TypeClass.SHORT_value:
            return readShortValue();

        case TypeClass.UNSIGNED_SHORT_value:
            return new Any(Type.UNSIGNED_SHORT, readShortValue());

        case TypeClass.LONG_value:
            return readLongValue();

        case TypeClass.UNSIGNED_LONG_value:
            return new Any(Type.UNSIGNED_LONG, readLongValue());

        case TypeClass.HYPER_value:
            return readHyperValue();

        case TypeClass.UNSIGNED_HYPER_value:
            return new Any(Type.UNSIGNED_HYPER, readHyperValue());

        case TypeClass.FLOAT_value:
            return readFloatValue();

        case TypeClass.DOUBLE_value:
            return readDoubleValue();

        case TypeClass.CHAR_value:
            return readCharValue();

        case TypeClass.STRING_value:
            return readStringValue();

        case TypeClass.TYPE_value:
            return readTypeValue();

        case TypeClass.SEQUENCE_value:
            {
                Object value = readSequenceValue(type);
                TypeDescription ctype = (TypeDescription)
                    type.getComponentType();
                while (ctype.getTypeClass() == TypeClass.SEQUENCE) {
                    ctype = (TypeDescription) ctype.getComponentType();
                }
                switch (ctype.getTypeClass().getValue()) {
                case TypeClass.UNSIGNED_SHORT_value:
                case TypeClass.UNSIGNED_LONG_value:
                case TypeClass.UNSIGNED_HYPER_value:
                    return new Any(new Type(type), value);

                case TypeClass.STRUCT_value:
                    if (ctype.hasTypeArguments()) {
                        return new Any(new Type(type), value);
                    }
                default:
                    return value;
                }
            }

        case TypeClass.ENUM_value:
            return readEnumValue(type);

        case TypeClass.STRUCT_value:
            {
                Object value = readStructValue(type);
                return type.hasTypeArguments()
                    ? new Any(new Type(type), value) : value;
            }

        case TypeClass.EXCEPTION_value:
            return readExceptionValue(type);

        case TypeClass.INTERFACE_value:
            {
                Object value = readInterfaceValue(type);
                return type.getZClass() == XInterface.class
                    ? value : new Any(new Type(type), value);
            }

        default:
            throw new RuntimeException(
                "Reading ANY with bad type " + type.getTypeClass());
View Full Code Here

                {
                    result = editor.execute();

                    if (result == null)
                    {
                        return new Any(new Type(), null);
                    }
                    return result;
                }

                metaData.loadSource()
                source = metaData.getSource();

                if ( source == null || source.length() == 0 )
                {
                  throw new ScriptFrameworkErrorException(
                        "Failed to read script", null,
                      metaData.getLanguageName(), metaData.getLanguage(),
                      ScriptFrameworkErrorType.UNKNOWN );
                }
                result = interpreter.eval( source );

                if (result == null)
                {
                    return new Any(new Type(), null);
                }
                return result;
            }
            catch ( bsh.ParseException pe )
            {
View Full Code Here

        }
        XIdlField2 f = (XIdlField2) UnoRuntime.queryInterface(
            XIdlField2.class, idlClass.getField(name));
        Object[] o = new Object[] {
                new Any(type, UnoRuntime.queryInterface(type, object)) };
        Object v = wrapValue(
            value,
            ((XIdlField2) UnoRuntime.queryInterface(
                XIdlField2.class, idlClass.getField(name))).getType(),
            (p.property.Attributes & PropertyAttribute.MAYBEAMBIGUOUS) != 0,
View Full Code Here

TOP

Related Classes of com.sun.star.uno.Any

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.