Package com.sun.codemodel

Examples of com.sun.codemodel.JVar.invoke()


                                      Class c,
                                      boolean nillable) {
        JExpression toSet;
        if (adapter != null) {
             JVar adapterVar = getAdapter(adapter);
             toSet = adapterVar.invoke("unmarshal").arg(builder.getXSR().invoke("getElementText"));
        } else if ((c.equals(String.class)
            || c.equals(Integer.class)
            || c.equals(Double.class)
            || c.equals(Float.class)
            || c.equals(Short.class)
View Full Code Here


                                        Adapter<Type, Class> adapter,
                                        Class c) {
        JExpression toSet;
        if (adapter != null) {
            JVar adapterVar = getAdapter(adapter);
            toSet = adapterVar.invoke("unmarshal").arg(JExpr.direct("_attValue"));
       } else if ((c.equals(String.class)
            || c.equals(Integer.class)
            || c.equals(Double.class)
            || c.equals(Float.class)
            || c.equals(Short.class)
View Full Code Here

                        JBlock newBody = each.body();
                        block = newBody;
                        propValue = each.var();
                    }
               
                block.add(marshaller.invoke("marshal").arg(propValue).arg(classBuilder.getXSW()));
//              }
            } else {
              logger.info("(JAXB Writer) Cannot map property " + prop.getName()
                                   + " with type " + prop.getRawType()
                                   + " on " + parentClass
View Full Code Here

                                      Class c,
                                      boolean nillable) {
        JExpression toSet;
        if (adapter != null) {
             JVar adapterVar = getAdapter(adapter);
             toSet = adapterVar.invoke("unmarshal").arg(builder.getXSR().invoke("getElementText"));
        } else if ((c.equals(String.class)
            || c.equals(Integer.class)
            || c.equals(Double.class)
            || c.equals(Float.class)
            || c.equals(Short.class)
View Full Code Here

                                        Adapter<Type, Class> adapter,
                                        Class c) {
        JExpression toSet;
        if (adapter != null) {
            JVar adapterVar = getAdapter(adapter);
            toSet = adapterVar.invoke("unmarshal").arg(JExpr.direct("_attValue"));
       } else if ((c.equals(String.class)
            || c.equals(Integer.class)
            || c.equals(Double.class)
            || c.equals(Float.class)
            || c.equals(Short.class)
View Full Code Here

      declareAssignParm(model, doSetupMethod.body(), holder, ARG_NAME, true);
    }

    for (DrillFuncHolder.WorkspaceReference ws : holder.getWorkspaceVars()) {
      if (ws.isInject()) {
        doSetupMethod.body().assign(wsFieldVars.get(ws), incomingJVar.invoke("getContext").invoke("getManagedBuffer"));
      }
    }

    doSetupMethod.body().directStatement(holder.getSetupBody());
  }
View Full Code Here

    JExpression projBatch = JExpr.cast(projBatchClass, g.getMappingSet().getOutgoing());

    g.getSetupBlock().add(projBatch.invoke("addComplexWriter").arg(complexWriter));


    g.getEvalBlock().add(complexWriter.invoke("setPosition").arg(g.getMappingSet().getValueWriteIndex()));

    sub.decl(g.getModel()._ref(ComplexWriter.class), returnValue.name, complexWriter);

    // add the subblock after the out declaration.
    g.getEvalBlock().add(topSub);
View Full Code Here

    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);
View Full Code Here

    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);");
View Full Code Here

      JVar outVV = g.declareVectorValueSetupAndMember("outgoing", new TypedFieldId(vv.getField().getType(), false, fieldId));

      if(hyper){

        g.getEvalBlock()._if(
                outVV
                        .invoke("copyFromSafe")
                        .arg(
                                inIndex.band(JExpr.lit((int) Character.MAX_VALUE)))
                        .arg(outIndex)
                        .arg(
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.