Examples of MethodDescription


Examples of com.sun.star.lib.uno.typedesc.MethodDescription

    boolean synchron = (requestHeader.response_flags != 0); // if != 0, then it should be 3
   
    TypeDescription typeDescription = TypeDescription.getTypeDescription(objectKey.sType.theString);
    ThreadID threadId = new ThreadID(logicalThreadID.IDs[0].threadID);

    MethodDescription methodDescription = typeDescription.getMethodDescription(requestHeader.operation.theString);

    Object params[] = new Object[methodDescription.getInSignature().length];

    if(synchron) // if the request is synchron, it is pending
      putPendingReply(threadId, new Object[]{params, methodDescription.getOutSignature(), methodDescription.getReturnSig(), new Integer(requestHeader.request_id)});
   
    IMessage iMessage = new Message(objectKey.sOid.theString,
                    null,
                    typeDescription,
                    methodDescription,
View Full Code Here

Examples of com.sun.star.lib.uno.typedesc.MethodDescription

    if(DEBUG) System.err.println("##### " + getClass().getName() + ".writeRequest:" + oid + " " + typeDescription + " " + operation);

    ++ _requestsSend;


    MethodDescription methodDescription = typeDescription.getMethodDescription(operation);

    Marshal marshal = new Marshal(false, _iBridge);

    TargetAddress targetAddress = new TargetAddress(-7,
                            (short)0,
                            marshalObjectKey(oid, typeDescription.getTypeName()),
                            new TaggedProfile(2, new byte[]{(byte)7, (byte)6, (byte)5}),
                            new IORAddressingInfo(3,
                                        new IOR(new CorbaString8(""),
                                            new TaggedProfile[0])
                                          )
                              );

    LogicalThreadID logicalThreadID = new LogicalThreadID(new OneThreadID[]{new OneThreadID(0, threadId.getBytes())});
    ServiceContext serviceContexts[] = new ServiceContext[]{new ServiceContext(4, marshalLogicalThreadID(logicalThreadID))};


    // if the type of request is not provided, use methodDescription if available, otherwise fall back to synchron
    if(synchron[0] == null) {
      if(methodDescription == null)
        synchron[0] = new Boolean(true);
      else
        synchron[0] = new Boolean(!methodDescription.isOneway());
    }


    int messageType = MsgType_1_1.Request_value;
    marshal.writeObject(__RequestHeader_1_2TypeDescription,
              new RequestHeader_1_2(++ _requestId,
                          (byte)(synchron[0].booleanValue() ? 3 : 0),
                          (byte)0, (byte)0, (byte)0,
                          targetAddress,
                          new CorbaString8(operation),
                          serviceContexts)
                );

    // write the in parameters
    for(int i = 0; i < methodDescription.getInSignature().length; ++ i) {
      if(methodDescription.getInSignature()[i] != null) { // is it an in parameter
        if(methodDescription.getOutSignature()[i] != null// is it also an out parameter
          marshal.writeObject(methodDescription.getOutSignature()[i].getComponentType(), ((Object [])params[i])[0]);
        else // in only
          marshal.writeObject(methodDescription.getInSignature()[i], params[i]);
      }
    }

    // add the marshal to the flush list
    _flushList.addElement(new Object[]{MsgType_1_1.Request, marshal});
View Full Code Here

Examples of nallar.tickthreading.patcher.mappings.MethodDescription

    this.mappings = mappings;
  }

  public void transformClassStaticMethods(CtClass ctClass, String className) {
    for (CtMethod ctMethod : ctClass.getDeclaredMethods()) {
      MethodDescription methodDescription = new MethodDescription(className, ctMethod.getName(), ctMethod.getSignature());
      MethodDescription mapped = mappings.map(methodDescription);
      if (mapped != null && !mapped.name.equals(ctMethod.getName())) {
        if ((ctMethod.getModifiers() & Modifier.STATIC) == Modifier.STATIC) {
          try {
            CtMethod replacement = CtNewMethod.copy(ctMethod, ctClass, null);
            ctMethod.setName(mapped.name);
View Full Code Here

Examples of nallar.tickthreading.patcher.mappings.MethodDescription

              after = field.substring(field.indexOf('.'));
              field = field.substring(0, field.indexOf('.'));
              if (!field.isEmpty() && (field.charAt(0) == '$') && prefix.isEmpty()) {
                ArrayList<String> parameterList = new ArrayList<String>();
                for (MethodDescription methodDescriptionOriginal : methodDescriptionList) {
                  MethodDescription methodDescription = mappings.rmap(mappings.map(methodDescriptionOriginal));
                  methodDescription = methodDescription == null ? methodDescriptionOriginal : methodDescription;
                  int i = 0;
                  for (String parameter : methodDescription.getParameterList()) {
                    if (parameterList.size() <= i) {
                      parameterList.add(parameter);
                    } else if (!parameterList.get(i).equals(parameter)) {
                      parameterList.set(i, null);
                    }
View Full Code Here

Examples of org.apache.tapestry5.plastic.MethodDescription

                final PlasticField registryField = plasticClass.introduceField(StrategyRegistry.class, "registry")
                        .inject(registry);

                for (final Method method : interfaceType.getMethods())
                {
                    plasticClass.introduceMethod(new MethodDescription(method), new InstructionBuilderCallback()
                    {
                        public void doBuild(InstructionBuilder builder)
                        {
                            Class returnType = method.getReturnType();
View Full Code Here

Examples of org.apache.tapestry5.plastic.MethodDescription

        for (int i = 0; i < exceptionClassNames.length; i++)
        {
            exceptionClassNames[i] = exceptions.get(i).replace('/', '.');
        }

        return new MethodDescription(node.access, returnType, node.name, arguments, node.signature, exceptionClassNames);
    }
View Full Code Here

Examples of org.apache.tapestry5.plastic.MethodDescription

        return new TransformMethodSignature(Modifier.PUBLIC, "void", name, RENDER_PHASE_METHOD_PARAMETERS, null);
    }

    private static MethodDescription renderPhaseDescription(String name)
    {
        return new MethodDescription(Modifier.PUBLIC, "void", name, RENDER_PHASE_METHOD_PARAMETERS, null, null);
    }
View Full Code Here

Examples of org.apache.tapestry5.plastic.MethodDescription

            plasticClass.introduceMethod(method).delegateTo(delegateField);
        }
       
        // TAP5-2235
        final String delegateTypeName = delegateType.getName();
        MethodDescription getDelegateMethodDescription =
                new MethodDescription(delegateTypeName, PlasticProxyFactoryImpl.INTERNAL_GET_DELEGATE);
        plasticClass.introduceMethod(getDelegateMethodDescription, new InstructionBuilderCallback()
        {
            @Override
            public void doBuild(InstructionBuilder builder)
            {
View Full Code Here

Examples of org.apache.tapestry5.plastic.MethodDescription

                final PlasticField registryField = plasticClass.introduceField(StrategyRegistry.class, "registry")
                        .inject(registry);

                for (final Method method : interfaceType.getMethods())
                {
                    plasticClass.introduceMethod(new MethodDescription(method), new InstructionBuilderCallback()
                    {
                        @Override
                        public void doBuild(InstructionBuilder builder)
                        {
                            Class returnType = method.getReturnType();
View Full Code Here

Examples of org.apache.tapestry5.plastic.MethodDescription

    public static final MethodDescription CLEANUP_RENDER_DESCRIPTION = renderPhaseDescription("cleanupRender");


    private static MethodDescription renderPhaseDescription(String name)
    {
        return new MethodDescription(Modifier.PUBLIC, "void", name, RENDER_PHASE_METHOD_PARAMETERS, null, null);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.