Examples of Invoke


Examples of com.google.test.metric.method.op.stack.Invoke

    final List<Type> params = signature.getParameters();
    final Type returnType = signature.getReturnType();
    recorder.add(new Runnable() {
      public void run() {
        String className = namer.nameClass(clazz);
        block.addOp(new Invoke(lineNumber, className, namer.nameMethod(className, name, desc),
            params, opcode == Opcodes.INVOKESTATIC, returnType));
      }
    });
  }
View Full Code Here

Examples of com.google.test.metric.method.op.stack.Invoke

    block.addOp(new Load(-1, var("methodThis"))); // this
    block.addOp(new GetField(-1, new FieldInfo(null, "p1", OBJECT,
        false, true, false)));
    block.addOp(new GetField(-1, new FieldInfo(null, "p2", OBJECT,
        false, true, false)));
    block.addOp(new Invoke(-1, null, "int methodA(int, int)", asList(JavaType.INT,
        JavaType.INT), false, OBJECT));
    block.addOp(new PutField(-1, new FieldInfo(null, "dst", OBJECT,
        false, true, false)));

    List<Operation> operations = new Stack2Turing(block).translate();
View Full Code Here

Examples of com.google.test.metric.method.op.stack.Invoke

    root.addOp(new Load(-1, var("this")));
    root.addOp(new Load(-1, var("root")));
    branchA.addOp(new Load(-1, var("A")));
    branchB.addOp(new Load(-1, var("B")));
    joined.addOp(new Load(-1, var("joined")));
    joined.addOp(new Invoke(-1, null, "void m(int, int, int)", asList(JavaType.INT,
        JavaType.INT, JavaType.INT), false, JavaType.VOID));

    List<Operation> operations = new Stack2Turing(root).translate();
    assertEquals(2, operations.size());
    MethodInvocation mB = (MethodInvocation) operations.get(0);
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.mtom1.Invoke

        imageDepot.setImageData(image);
        setText(imageDepot);
       
        //Create a request bean with imagedepot bean as value
        ObjectFactory factory = new ObjectFactory();
        Invoke request = factory.createInvoke();
        request.setInput(imageDepot);
       
        SendImageResponse response = (SendImageResponse) dispatch.invoke(request);
       
        assertNotNull(response);
        assertNotNull(response.getOutput().getImageData());
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.mtom1.Invoke

        imageDepot.setImageData(image);
        setText(imageDepot);
       
        //Create a request bean with imagedepot bean as value
        ObjectFactory factory = new ObjectFactory();
        Invoke request = factory.createInvoke();
        request.setInput(imageDepot);
       
        SendImageResponse response = (SendImageResponse) dispatch.invoke(request);
       
        assertNotNull(response);
        assertNotNull(response.getOutput().getImageData());
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.mtom1.Invoke

        imageDepot.setImageData(image);
        setText(imageDepot);
       
        //Create a request bean with imagedepot bean as value
        ObjectFactory factory = new ObjectFactory();
        Invoke request = factory.createInvoke();
        request.setInput(imageDepot);
       
        SendImageResponse response = (SendImageResponse) dispatch.invoke(request);
       
        assertNotNull(response);
        assertNotNull(response.getOutput().getImageData());
View Full Code Here

Examples of org.apache.commons.scxml.model.Invoke

        List t = s.getTransitionsList();
        for (int i = 0; i < t.size(); i++) {
            serializeTransition(b, (Transition) t.get(i), indent + INDENT);
        }
        Parallel p = s.getParallel(); //TODO: Remove in v1.0
        Invoke inv = s.getInvoke();
        if (p != null) {
            serializeParallel(b, p, indent + INDENT);
        } else if (inv != null) {
            serializeInvoke(b , inv, indent + INDENT);
        } else {
View Full Code Here

Examples of org.apache.commons.scxml.model.Invoke

        for (int i = 0; i < t.size(); i++) {
            Transition trn = (Transition) t.get(i);
            updateTransition(trn, targets);
        }
        Parallel p = s.getParallel(); //TODO: Remove in v1.0
        Invoke inv = s.getInvoke();
        if ((inv != null && p != null)
                || (inv != null && !c.isEmpty())
                || (p != null && !c.isEmpty())) {
            logAndThrowModelError(ERR_STATE_BAD_CONTENTS,
                new Object[] {getStateName(s)});
        }
        if (p != null) {
            updateParallel(p, targets);
        } else if (inv != null) {
            String ttype = inv.getTargettype();
            if (ttype == null || ttype.trim().length() == 0) {
                logAndThrowModelError(ERR_INVOKE_NO_TARGETTYPE,
                    new Object[] {getStateName(s)});
            }
            String src = inv.getSrc();
            boolean noSrc = (src == null || src.trim().length() == 0);
            String srcexpr = inv.getSrcexpr();
            boolean noSrcexpr = (srcexpr == null
                                 || srcexpr.trim().length() == 0);
            if (noSrc && noSrcexpr) {
                logAndThrowModelError(ERR_INVOKE_NO_SRC,
                    new Object[] {getStateName(s)});
View Full Code Here

Examples of org.apache.commons.scxml.model.Invoke

        for (int i = 0; i < t.size(); i++) {
            Transition trn = (Transition) t.get(i);
            updateTransition(trn, targets);
        }
        Parallel p = s.getParallel(); //TODO: Remove in v1.0
        Invoke inv = s.getInvoke();
        if ((inv != null && p != null)
                || (inv != null && !c.isEmpty())
                || (p != null && !c.isEmpty())) {
            logAndThrowModelError(ERR_STATE_BAD_CONTENTS,
                new Object[] {getStateName(s)});
        }
        if (p != null) {
            updateParallel(p, targets);
        } else if (inv != null) {
            String ttype = inv.getTargettype();
            if (ttype == null || ttype.trim().length() == 0) {
                logAndThrowModelError(ERR_INVOKE_NO_TARGETTYPE,
                    new Object[] {getStateName(s)});
            }
            String src = inv.getSrc();
            boolean noSrc = (src == null || src.trim().length() == 0);
            String srcexpr = inv.getSrcexpr();
            boolean noSrcexpr = (srcexpr == null
                                 || srcexpr.trim().length() == 0);
            if (noSrc && noSrcexpr) {
                logAndThrowModelError(ERR_INVOKE_NO_SRC,
                    new Object[] {getStateName(s)});
View Full Code Here

Examples of org.apache.commons.scxml.model.Invoke

        Collection internalEvents = step.getAfterStatus().getEvents();
        for (Iterator iter = step.getAfterStatus().getStates().iterator();
                iter.hasNext();) {
            State s = (State) iter.next();
            Context ctx = scInstance.getContext(s);
            Invoke i = s.getInvoke();
            if (i != null && scInstance.getInvoker(s) == null) {
                String src = i.getSrc();
                if (src == null) {
                    String srcexpr = i.getSrcexpr();
                    Object srcObj = null;
                    try {
                        ctx.setLocal(NAMESPACES_KEY, i.getNamespaces());
                        srcObj = eval.eval(ctx, srcexpr);
                        ctx.setLocal(NAMESPACES_KEY, null);
                        src = String.valueOf(srcObj);
                    } catch (SCXMLExpressionException see) {
                        errRep.onError(ErrorConstants.EXPRESSION_ERROR,
                            see.getMessage(), i);
                    }
                }
                String source = src;
                PathResolver pr = i.getPathResolver();
                if (pr != null) {
                    source = i.getPathResolver().resolvePath(src);
                }
                String ttype = i.getTargettype();
                Invoker inv = null;
                try {
                    inv = scInstance.newInvoker(ttype);
                } catch (InvokerException ie) {
                    TriggerEvent te = new TriggerEvent(s.getId()
                        + ".invoke.failed", TriggerEvent.ERROR_EVENT);
                    internalEvents.add(te);
                    continue;
                }
                inv.setParentStateId(s.getId());
                inv.setSCInstance(scInstance);
                List params = i.params();
                Map args = new HashMap();
                for (Iterator pIter = params.iterator(); pIter.hasNext();) {
                    Param p = (Param) pIter.next();
                    String argExpr = p.getExpr();
                    Object argValue = 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.