Package com.sun.codemodel

Examples of com.sun.codemodel.JBlock.assign()


        } else {
          earlyExit = eval._if(arg.getValue().ne(JExpr.lit(1)))._then();              
        }
       
        if (out.isOptional()) {
          earlyExit.assign(out.getIsSet(), JExpr.lit(1));
        }
       
        earlyExit.assign(out.getValue(),  JExpr.lit(0));            
        earlyExit._break(label);           
      }
View Full Code Here


       
        if (out.isOptional()) {
          earlyExit.assign(out.getIsSet(), JExpr.lit(1));
        }
       
        earlyExit.assign(out.getValue(),  JExpr.lit(0));            
        earlyExit._break(label);           
      }
     
      if (out.isOptional()) {
        assert (e != null);
View Full Code Here

       
        JConditional notSetJC = eval._if(e.eq(JExpr.lit(0)));
        notSetJC._then().assign(out.getIsSet(), JExpr.lit(0));
       
        JBlock setBlock = notSetJC._else().block();
        setBlock.assign(out.getIsSet(), JExpr.lit(1));
        setBlock.assign(out.getValue(), JExpr.lit(1));
      } else {
        assert (e == null);           
        eval.assign(out.getValue(), JExpr.lit(1)) ;
      }
View Full Code Here

        JConditional notSetJC = eval._if(e.eq(JExpr.lit(0)));
        notSetJC._then().assign(out.getIsSet(), JExpr.lit(0));
       
        JBlock setBlock = notSetJC._else().block();
        setBlock.assign(out.getIsSet(), JExpr.lit(1));
        setBlock.assign(out.getValue(), JExpr.lit(1));
      } else {
        assert (e == null);           
        eval.assign(out.getValue(), JExpr.lit(1)) ;
      }
     
View Full Code Here

        } else {
          earlyExit = eval._if(arg.getValue().eq(JExpr.lit(1)))._then();              
        }
       
        if (out.isOptional()) {
          earlyExit.assign(out.getIsSet(), JExpr.lit(1));
        }
       
        earlyExit.assign(out.getValue(),  JExpr.lit(1));            
        earlyExit._break(label);           
      }
View Full Code Here

       
        if (out.isOptional()) {
          earlyExit.assign(out.getIsSet(), JExpr.lit(1));
        }
       
        earlyExit.assign(out.getValue(),  JExpr.lit(1));            
        earlyExit._break(label);           
      }
     
      if (out.isOptional()) {
        assert (e != null);
View Full Code Here

       
        JConditional notSetJC = eval._if(e.eq(JExpr.lit(0)));
        notSetJC._then().assign(out.getIsSet(), JExpr.lit(0));
       
        JBlock setBlock = notSetJC._else().block();
        setBlock.assign(out.getIsSet(), JExpr.lit(1));
        setBlock.assign(out.getValue(), JExpr.lit(0));
      } else {
        assert (e == null);           
        eval.assign(out.getValue(), JExpr.lit(0)) ;
      }
View Full Code Here

        JConditional notSetJC = eval._if(e.eq(JExpr.lit(0)));
        notSetJC._then().assign(out.getIsSet(), JExpr.lit(0));
       
        JBlock setBlock = notSetJC._else().block();
        setBlock.assign(out.getIsSet(), JExpr.lit(1));
        setBlock.assign(out.getValue(), JExpr.lit(0));
      } else {
        assert (e == null);           
        eval.assign(out.getValue(), JExpr.lit(0)) ;
      }
     
View Full Code Here

    //JExpr.newArray(model.INT).

    JVar fieldArr = b.decl(model.INT.array(), "fieldIds" + index++, JExpr.newArray(model.INT, fieldId.getFieldIds().length));
    int[] fieldIndices = fieldId.getFieldIds();
    for(int i = 0; i < fieldIndices.length; i++){
       b.assign(fieldArr.component(JExpr.lit(i)), JExpr.lit(fieldIndices[i]));
    }

    JInvocation invoke = batchName
        .invoke("getValueAccessorById") //
        .arg( vvClass.dotclass())
View Full Code Here

        getNextVar("tmp"), //
        invoke.invoke(vectorAccess));

    b._if(obj.eq(JExpr._null()))._then()._throw(JExpr._new(t).arg(JExpr.lit(String.format("Failure while loading vector %s with id: %s.", vv.name(), fieldId.toString()))));
    //b.assign(vv, JExpr.cast(retClass, ((JExpression) JExpr.cast(wrapperClass, obj) ).invoke(vectorAccess)));
    b.assign(vv, JExpr.cast(retClass, obj ));
    vvDeclaration.put(setup, vv);

    return vv;
  }
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.