Package com.sun.star.uno

Examples of com.sun.star.uno.IMethodDescription


  public IMethodDescription getMethodDescription(String name) {
    if(_methodDescriptionsByName == null)
      _initMethodTypeInfos();

    IMethodDescription iMethodDescription = (MethodDescription)_methodDescriptionsByName.get(name);
    if(iMethodDescription == null && _superType != null)
      iMethodDescription = _superType.getMethodDescription(name);

    return iMethodDescription;
  }
View Full Code Here


      boolean tmp_passed = superType == null || (names.length == 6 && _superType.test(notpassed, (Object [])names[5], superType));
      passed = passed && tmp_passed;
      if(!tmp_passed)
        notpassed.addElement(comment + "- getSuperType - " + superType);
     
      IMethodDescription iMethodDescriptions[] = iTypeDescription.getMethodDescriptions();
      tmp_passed = iMethodDescriptions != null;
      tmp_passed = tmp_passed && _methodSignatures.length == iMethodDescriptions.length;
      if(tmp_passed)
        for(int i = 0; i < _methodSignatures.length; ++ i) {
          boolean tmp_tmp_passed = _methodSignatures[i].test(notpassed, i + _method_offset, iMethodDescriptions[i]);

          tmp_passed = tmp_passed && tmp_tmp_passed;
          if(!tmp_tmp_passed)
            notpassed.addElement(comment + "- getMethodDescriptions - index:" + i);
        }
      else
        notpassed.addElement(comment + "- getMethodDescriptions - size:" + iMethodDescriptions.length);     
      passed = passed && tmp_passed;

     
      for(int i = 0; i < _method_names.length; ++ i) {
        IMethodDescription iMethodDescription = iTypeDescription.getMethodDescription(i + _method_offset);
        tmp_passed = iMethodDescription != null && _methodSignatures[i].test(notpassed, i + _method_offset, iMethodDescription);
        passed = passed && tmp_passed;
        if(!tmp_passed)
          notpassed.addElement(comment + "- getMethodDescription(int " + (i + _method_offset) + ") - " + iMethodDescription);
      }
     
      for(int i = 0; i < _method_names.length; ++ i) {
        IMethodDescription iMethodDescription  = iTypeDescription.getMethodDescription(_method_names[i]);
        tmp_passed = iMethodDescription != null && _methodSignatures[i].test(notpassed, i + _method_offset, iMethodDescription);
        passed = passed && tmp_passed;
        if(!tmp_passed)
          notpassed.addElement(comment + "- getMethodDescription(String " + _method_names[i] + ")");
      }
View Full Code Here

            (currentContext && !internal
             && functionId != MethodDescription.ID_RELEASE)
            ? (XCurrentContext) unmarshal.readInterface(
                new Type(XCurrentContext.class))
            : null;
        IMethodDescription desc = inL1Type.getMethodDescription(functionId);
        ITypeDescription[] inSig = desc.getInSignature();
        ITypeDescription[] outSig = desc.getOutSignature();
        Object[] args = new Object[inSig.length];
        for (int i = 0; i < args.length; ++i) {
            if (inSig[i] != null) {
                if (outSig[i] != null) {
                    Object inout = Array.newInstance(
                        outSig[i].getComponentType().getZClass(), 1);
                    Array.set(
                        inout, 0,
                        unmarshal.readValue(
                            (TypeDescription) outSig[i].getComponentType()));
                    args[i] = inout;
                } else {
                    args[i] = unmarshal.readValue((TypeDescription) inSig[i]);
                }
            } else {
                args[i] = Array.newInstance(
                    outSig[i].getComponentType().getZClass(), 1);
            }
        }
        boolean sync = forcedSynchronous || !desc.isOneway();
        if (sync) {
            pendingIn.push(
                inL1Tid, new PendingRequests.Item(internal, desc, args));
        }
        return new UrpMessage(
View Full Code Here

    private boolean writeRequest(
        boolean internal, String oid, TypeDescription type, String function,
        ThreadId tid, Object[] arguments)
        throws IOException
    {
        IMethodDescription desc = type.getMethodDescription(function);
        synchronized (output) {
            if (desc.getIndex() == MethodDescription.ID_RELEASE
                && releaseQueue.size() < MAX_RELEASE_QUEUE_SIZE)
            {
                releaseQueue.add(
                    new QueuedRelease(internal, oid, type, desc, tid));
                return false;
View Full Code Here

    public Object execute() throws Throwable {
        Object msgResult = _iMessage.getResult();
        if (_iMessage.isRequest()) {
            Object result = null;
            Throwable exception = null;
            IMethodDescription md = _iMessage.getMethod();
            Object[] args = _iMessage.getArguments();
            XCurrentContext oldCC = UnoRuntime.getCurrentContext();
            UnoRuntime.setCurrentContext(_iMessage.getCurrentContext());
            try {
                result = md.getIndex() == MethodDescription.ID_QUERY_INTERFACE
                    ? dispatch_queryInterface((Type) args[0])
                    : md.getMethod().invoke(_object, args);
            } catch (InvocationTargetException e) {
                exception = e.getTargetException();
                if (exception == null) {
                    exception = e;
                }
View Full Code Here

    System.err.println("TypeClass:" + iTypeDescription.getTypeClass());
    System.err.println("ComponentType:" + iTypeDescription.getComponentType());
    System.err.println("Class:" + iTypeDescription.getZClass());
   
    System.err.println("Methods:");
    IMethodDescription iMethodDescriptions[] = iTypeDescription.getMethodDescriptions();
    if(iMethodDescriptions != null)
      for(int i = 0; i < iMethodDescriptions.length; ++ i) {
        System.err.print("Name: " + iMethodDescriptions[i].getName());
        System.err.print(" index: " + iMethodDescriptions[i].getIndex());
        System.err.print(" isOneyWay: " + iMethodDescriptions[i].isOneway());
View Full Code Here

                        prefix + "; getMethodDescriptions " + i,
                        i + methodOffset, mds[i]);
                }
            }
            for (int i = 0; i < methodNames.length; ++i) {
                IMethodDescription md = description.getMethodDescription(
                    i + methodOffset);
                assure(prefix + "; getMethodDescription " + (i + methodOffset),
                       md != null);
                methodSignatures[i].test(
                    prefix + "; getMethodDescription " + (i + methodOffset),
                    i + methodOffset, md);
            }
            for (int i = 0; i < methodNames.length; ++i) {
                IMethodDescription md = description.getMethodDescription(
                    methodNames[i]);
                assure(prefix + "; getMethodDescription " + methodNames[i],
                       md != null);
                methodSignatures[i].test(
                    prefix + "; getMethodDescription " + methodNames[i],
View Full Code Here

                        prefix + "; getMethodDescriptions " + i,
                        i + methodOffset, mds[i]);
                }
            }
            for (int i = 0; i < methodNames.length; ++i) {
                IMethodDescription md = description.getMethodDescription(
                    i + methodOffset);
                assure(prefix + "; getMethodDescription " + (i + methodOffset),
                       md != null);
                methodSignatures[i].test(
                    prefix + "; getMethodDescription " + (i + methodOffset),
                    i + methodOffset, md);
            }
            for (int i = 0; i < methodNames.length; ++i) {
                IMethodDescription md = description.getMethodDescription(
                    methodNames[i]);
                assure(prefix + "; getMethodDescription " + methodNames[i],
                       md != null);
                methodSignatures[i].test(
                    prefix + "; getMethodDescription " + methodNames[i],
View Full Code Here

                methodSignatures[i].test(
                    prefix + "; getMethodDescriptions " + i,
                    i + methodOffset, mds[i]);
            }
            for (int i = 0; i < methodNames.length; ++i) {
                IMethodDescription md = description.getMethodDescription(
                    i + methodOffset);
                assure(prefix + "; getMethodDescription " + (i + methodOffset),
                       md != null);
                methodSignatures[i].test(
                    prefix + "; getMethodDescription " + (i + methodOffset),
                    i + methodOffset, md);
            }
            for (int i = 0; i < methodNames.length; ++i) {
                IMethodDescription md = description.getMethodDescription(
                    methodNames[i]);
                assure(prefix + "; getMethodDescription " + methodNames[i],
                       md != null);
                methodSignatures[i].test(
                    prefix + "; getMethodDescription " + methodNames[i],
View Full Code Here

  public IMethodDescription getMethodDescription(int methodId) {
    if(_methodDescriptionsByName == null)
      _initMethodTypeInfos();

    IMethodDescription iMethodDescription = null;

    int relMethodId = methodId - (_offset - _methodDescriptions.length);

    if(relMethodId >= 0 && relMethodId < _methodDescriptions.length)
      iMethodDescription = _methodDescriptions[relMethodId];
View Full Code Here

TOP

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

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.