Examples of JConditional


Examples of com.sun.codemodel.JConditional

    g.getEvalBlock().add(topSub);

    addProtectedBlock(g, sub, body, inputVariables, workspaceJVars, false);
   
   
    JConditional jc = g.getEvalBlock()._if(complexWriter.invoke("ok").not());
   
    jc._then().add(complexWriter.invoke("reset"));   
    //jc._then().directStatement("System.out.println(\"debug : write ok fail!, inIndex = \" + inIndex);");
    jc._then()._return(JExpr.FALSE);
   
    //jc._else().directStatement("System.out.println(\"debug : write successful, inIndex = \" + inIndex);");   
   
    g.getEvalBlock().directStatement(String.format("//---- end of eval portion of %s function. ----//", registeredNames[0]));
View Full Code Here

Examples of com.sun.codemodel.JConditional

      if(e != null){
        // if at least one expression must be checked, set up the conditional.
        returnValueType = returnValue.type.toBuilder().setMode(DataMode.OPTIONAL).build();
        out = g.declare(returnValueType);
        e = e.eq(JExpr.lit(0));
        JConditional jc = sub._if(e);
        jc._then().assign(out.getIsSet(), JExpr.lit(0));
        sub = jc._else();
      }
    }

    if(out == null) out = g.declare(returnValueType);
View Full Code Here

Examples of com.sun.codemodel.internal.JConditional

                // RESULT: <value>.<method>()
                inv = $value.invoke(printMethod);

                // check value is not null ... if(value == null) return null;
                JConditional jcon = marshal.body()._if($value.eq(JExpr._null()));
                jcon._then()._return(JExpr._null());
            } else {
                // RESULT: <className>.<method>(<value>)
                if(this.printMethod==null) {
                    // HACK HACK HACK
                    JType t = inMemoryType.unboxify();
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.